|
Hi all,
I've never working with a web base application before. I'll explain my question as follows.
I've an application, a windows base application written in C#. There is a GUI to communicate with a user.
Now what I want to do is, simply remove that GUI and replace it with a Web interface, actually a web browser interface. How can I do it. Can I use that application as a dll with the web base interface.
Your comments really appreciate,
Thanks
I appreciate your help all the time...
CodingLover
|
|
|
|
|
I have had this need a couple of times and in theory you can add webmethod to your dll methods and do this but the difference of stateless processing is just enough that it was easier to rebuild the object model to support both properly.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
Thanks,
How about working on ASP.Net, I can use dll. Basically what I want to do first is wrap the exciting application in to dll and call them in ASP. What's your comment?
I appreciate your help all the time...
CodingLover
|
|
|
|
|
absolutely, your code behind can reference the DLL
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
Ok, So the first thing I have to do is, wrap the application in to dll. That means the interface of the dll should be more strong as possible. I mean well define.
I appreciate your help all the time...
CodingLover
|
|
|
|
|
i want to enter some text in textbox but once i start entering the text in the text box the text box should show the word related to the entered letter. i dont know what code i should write for this..???
|
|
|
|
|
For this you have to user javascript or any third pary tool or use icallback
|
|
|
|
|
|
hi.... i have made two fields in SQL server 2005 named DistrictId smallint and DistrictName varchar(100).In a web application (language C#) i have made a form in which i have made a text box in which user will enter the name of the district which he want to modify.i want a code for the purpose that user will enter the name of district and when he click on the button named MODIFY the district name will be modified.Please help me as soon as possible...........
|
|
|
|
|
SqlParameter[] myparm = new SqlParameter[2];
myparm[0] = new SqlParameter("@DistrictNewName", this.txtDistricNewName.Text);
myparm[1] = new SqlParameter("@DistrictName", this.txtDistricName.Text);
String SqlQuery = "UPDATE TableName SET DistrictName = @DistrictNewName WHERE DistrictName = DistrictName";
This should get you started.
|
|
|
|
|
how can i write the code for auto completion of sentence or word in c# .net?
|
|
|
|
|
what you mean by auto completion
Vikas Amin
My First Article on CP" Virtual Serial Port "[^]
modified on Thursday, July 24, 2008 5:33 PM
|
|
|
|
|
hi everyone
I want to connect a comport of other computer on network.But i not connect.
How do I connect?
|
|
|
|
|
|
I am a beginner
Iwant to know what is dll file and how to create a setup file
|
|
|
|
|
Hi,
DLL - Dynamic Link Library
DLL refers to a type of file that is stored either locally or remotely and is a collection of commands and/or data which can be shared by different programs on the same platform.
Typical DLL files contain commands and/or data that are common to a certain task, for instance Windows has many DLL files built-in which other programs access and utilise.
For more information on this please refer to the following linke:
What is dll File?[^]
Following are the steps to create a setup file using VB.Net
1) Select the setup and deployment projects when clicking the new project in the vb.net.
2) Select the setup project and enter the name in the text box .
3) The setup1 file will be created.
4) Add project output for the setup1.
5) Create shortcut for the appliction folder and user's desktop.
6) Change the configuration into release from the configuration manager.
7) And the build the setup.
Hope this helps
Regards,
John Adams
ComponentOne LLC
|
|
|
|
|
will there be any change with C#
because i am doing every thing on C#
|
|
|
|
|
It should be the same for a C# app.
The best way to accelerate a Macintosh is at 9.8m/sec² - Marcus Dolengo
|
|
|
|
|
Hi kiranreddy123
I understand that you want to learn and all that, but before you can start asking someone what is what , you have to make a research your self.You see, you cannot be a Good Programmer if you dont research. try to buy a Book and there are some E-books that you can get for free that i can share too. but please Google first before you post because if you google your question, you will find a lot of asnwers.
Hope this Helps
Vuyiswa Maseko,
Sorrow is Better than Laughter, it may Sadden your Face, but It sharpens your Understanding
VB.NET/SQL7/2000/2005
http://vuyiswamb.007ihost.com
http://Ecadre.007ihost.com
vuyiswam@tshwane.gov.za
|
|
|
|
|
Hi,
I want to create a Windows Media Services Publising Point using C#, with only RTSP stream.
I have the file path, and publising point name input by user.
Also how can we chaek if the Publising point is exisiting or not, and also to check that is a certain publishing point is started or not.
Plzzzz Help.
Thanks.
Deepak Surana
|
|
|
|
|
Did you ever figure this out? I need to do the same thing, and it's been a pain.
Thanks....
|
|
|
|
|
Hi all,
Can i use override void OnPaintBackground in custom user control?My purpose to use this method in custom user control is because i will draw the base line (grid) as image in the drawing area at the initiate state, but after that, i don't want to repaint again the background(image) when i draw some line on it. Thus, i need to override the OnPaintBackground method and disable it to fulfill my purpose. I can done it in Component,but how about in custom user control?
Any tips are welcome.
regards
cocoonwls
|
|
|
|
|
Hi,
you can override OnPaintBackground, I haven't have any problem with that so far. If you want to draw over default background, be sure to call base.OnPaintBackground as a first thing in your override method. If you want to draw your background completely by yourself, don't call base.OnPaintBackground at all.
hope this helps
|
|
|
|
|
hi Michal Martinka,
Thanks for your hlep.i will try it out
|
|
|
|
|
Hi, i'm new in this forum.
I am currently developing a Pocket Application using C# & SQL CE. Now, everything was working fine until just now. When I do any type of operations in the database (insert, update & delete) running the application in the device everything goes right, no errors. But When I check the database, no changes has been made. It seems that everything is working but I do not know if I'm missing something. I didn't noticed this until i was testing my RDA functions, when i realized that the tables didn't have any data of the SQL Server, any idea of how to solve this?
this class creates connections to the SQL CE database.
using System;
using System.Collections.Generic;
using System.Text;
using System.Data.SqlServerCe;
using System.Data.SqlClient;
using System.Windows;
using System.IO;
using CAPocket.Clases;
namespace CAPocket.Clases
{
class Data
{
String cadenaCon;
public Data()
{
cadenaCon = @"Data Source =\Program Files\CAPocket\Sistema.sdf;SSCE:Database Password='pam653045';";
}
public SqlCeConnection GetConnection()
{
SqlCeConnection con = new SqlCeConnection(cadenaCon);
try
{
con.Open();
return con;
}
catch (SqlCeException ex)
{
return null;
}
}
public SqlCeDataAdapter getAdapter(String s_sql)
{
SqlCeDataAdapter adp;
try
{
adp = new SqlCeDataAdapter(s_sql, cadenaCon);
return adp;
}
catch (SqlCeException ex)
{ return null; }
}
}
}
This code block of a class allows the administrator to add, delete or get all the users registered in the application:
using System;
using System.Collections.Generic;
using System.Text;
using System.Data.SqlServerCe;
using System.Data.SqlClient;
using System.Windows;
using System.IO;
using System.Data;
using CAPocket.Clases;
namespace CAPocket
{
class GestionUsuarios
{
public GestionUsuarios()
{
}
Data cex;
SqlCeConnection cnn;
SqlCeCommand cmd;
public bool NuevoUsuario(String user, String pass, String tipo)
{
cex = new Data();
cnn = cex.GetConnection();
if (cnn != null)
{
String sql = "insert into Usuarios values ('" + user + "','" + pass + "', '" + tipo + "')";
cmd = new SqlCeCommand(sql, cnn);
try
{
cmd.ExecuteNonQuery();
return true;
}
catch (SqlCeException ex)
{ return false; }
finally
{ cnn.Close(); }
}
else
{ return false; }
}
public bool Existe(String user, String pass)
{
cex = new Data();
cnn = cex.GetConnection();
String sql = "select * from Usuarios where Usuario='" + user + "'";
if (cnn != null)
{
cmd = new SqlCeCommand(sql, cnn);
try
{
SqlCeDataReader dr;
dr = cmd.ExecuteReader();
if (dr.Read())
{
return true;
}
else
{
return false;
}
}
catch(SqlCeException ex)
{ return false; }
finally
{ cnn.Close(); }
}
else
{ return false; }
}
public DataSet getAllUsers()
{
DataSet ds = new DataSet();
cex = new Data();
SqlCeDataAdapter adp = cex.getAdapter("Select Usuario, TipoUsuario from Usuarios order by TipoUsuario");
adp.Fill(ds, "Usuarios");
return ds;
}
public bool EliminarUsuario(String user)
{
cex = new Data();
cnn = cex.GetConnection();
String sql = "delete from Usuarios where Usuario='" + user + "'";
if (cnn != null)
{
cmd = new SqlCeCommand(sql, cnn);
try
{
cmd.ExecuteNonQuery();
return true;
}
catch (SqlCeException ex)
{ return false; }
finally
{ cnn.Close(); }
}
else { return false; }
}
}
}
the next code is from the form where you add, delete and show all the users.
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using System.Data.SqlServerCe;
using System.Data.SqlClient;
using System.Windows;
using System.IO;
using CAPocket.Clases;
namespace CAPocket
{
public partial class frmUsuarios : Form
{
public frmUsuarios()
{
InitializeComponent();
}
public DataSet dset;
GestionUsuarios gu;
public void RefreshGrid()
{
gu = new GestionUsuarios();
dset = new DataSet();
dset.Clear();
dset = gu.getAllUsers();
dataGrid1.DataSource = dset.Tables["Usuarios"];
dataGrid1.TableStyles.Clear();
DataGridTableStyle ts = new DataGridTableStyle();
ts.MappingName = "Usuarios";
DataGridColumnStyle cUsuario = new DataGridTextBoxColumn();
cUsuario.HeaderText = "Usuario";
cUsuario.MappingName = "Usuario";
cUsuario.Width = 75;
ts.GridColumnStyles.Add(cUsuario);
DataGridColumnStyle cTipoUsuario = new DataGridTextBoxColumn();
cTipoUsuario.HeaderText = "Tipo de Usuario";
cTipoUsuario.MappingName = "TipoUsuario";
cTipoUsuario.Width = 100;
ts.GridColumnStyles.Add(cTipoUsuario);
dataGrid1.TableStyles.Add(ts);
}
private void frmUsuarios_Load(object sender, EventArgs e)
{
RefreshGrid();
}
private void btAgregar_Click(object sender, EventArgs e)
{
GestionUsuarios gu = new GestionUsuarios();
bool resultado = gu.Existe(txtUsuario.Text, txtPassword.Text);
if (resultado == false)
{
if (radioButton1.Checked == true)
{ resultado = gu.NuevoUsuario(txtUsuario.Text, txtPassword.Text, "Usuario"); }
if (radioButton2.Checked == true)
{ resultado = gu.NuevoUsuario(txtUsuario.Text, txtPassword.Text,"Administrador"); }
if (resultado == true)
{
MessageBox.Show("Usuario agregado exitosamente", "Resultados");
RefreshGrid();
}
else
{ MessageBox.Show("Error al guardar","Errores"); }
}
else
{
MessageBox.Show("El usuario ya existe","Errores");
}
txtUsuario.Text = "";
txtPassword.Text = "";
}
private void datagrid1_Click(object sender, EventArgs e)
{
dataGrid1.Select(dataGrid1.CurrentRowIndex);
textBox1.Text = dataGrid1[dataGrid1.CurrentRowIndex, 0].ToString();
}
private void dataGrid1_CurrentCellChanged(object sender, EventArgs e)
{
dataGrid1.Select(dataGrid1.CurrentRowIndex);
textBox1.Text = dataGrid1[dataGrid1.CurrentRowIndex, 0].ToString();
}
private void btEliminar_Click(object sender, EventArgs e)
{
gu = new GestionUsuarios();
bool resultado = gu.EliminarUsuario(textBox1.Text);
if (resultado == true)
{
MessageBox.Show("Usuario eliminado", "Resultados");
RefreshGrid();
}
else
{ MessageBox.Show("Error al eliminar", "Error"); }
}
private void button1_Click(object sender, EventArgs e)
{
this.Close();
}
}
}
Hope anyone can help me!
|
|
|
|