protected void btnAllo_Click(object sender, EventArgs e) { string var_comp_no; string var_Tech_name; var_comp_no = ddlComplaint.SelectedValue; var_Tech_name=ddlAllow.SelectedValue; SqlCommand cmd_insert = new SqlCommand(); SqlConnection con = new SqlConnection("SERVER=KSHITIJA-PC; Initial Catalog=CRM;Integrated Security=True"); cmd_insert.Connection = con; cmd_insert.CommandType = CommandType.StoredProcedure; cmd_insert.CommandText = "Allocate_Call"; cmd_insert.Parameters.Add(new SqlParameter("@comp_no", SqlDbType.Int)); cmd_insert.Parameters["@comp_no"].Value = var_comp_no; ; cmd_insert.Parameters.Add(new SqlParameter("@Tech_name", SqlDbType.VarChar, 50)); cmd_insert.Parameters["@Tech_name"].Value = var_Tech_name; try { con.Open(); int i = cmd_insert.ExecuteNonQuery(); ; //int a = cmd1.ExecuteNonQuery(); if (i == 1) { ddlComplaint.SelectedItem.Text = ""; EO.Web.MsgBoxButton mb = new EO.Web.MsgBoxButton("OK"); MsgBox1.Show("Message: ", "Call Assigned to Technician", null, mb); } } catch (Exception ex) { EO.Web.MsgBoxButton mb = new EO.Web.MsgBoxButton("OK"); MsgBox1.Show("Error: ", ex.Message, null, mb); } finally { con.Close(); } }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)