protected void btn1_Click(object sender, EventArgs e) { dbcon db3 = new dbcon(); SqlCommand cmd3 = new SqlCommand(); cmd3.CommandText = "insert into che_tbl values(@chemistid,@che_name,@shop_name,@place,@post,@pin,@state,@district,@lan_no,@mb_no,@email,@status)"; cmd3.Parameters.AddWithValue("@chemistid", txt1.Text); cmd3.Parameters.AddWithValue("@che_name", txt2.Text); cmd3.Parameters.AddWithValue("@shop_name", txt3.Text); cmd3.Parameters.AddWithValue("@place", txt4.Text); cmd3.Parameters.AddWithValue("@post", txt5.Text); cmd3.Parameters.AddWithValue("@pin", txt6.Text); cmd3.Parameters.AddWithValue("@state", ddl1.SelectedItem.Text); cmd3.Parameters.AddWithValue("@district", ddl2.SelectedItem.Text); cmd3.Parameters.AddWithValue("@lan_no", txt7.Text); cmd3.Parameters.AddWithValue("@mb_no", txt8.Text); cmd3.Parameters.AddWithValue("@email", txt9.Text); cmd3.Parameters.AddWithValue("@status", txt10.Text); db3.execute(cmd3); dbcon db4 = new dbcon(); SqlCommand cmd4 = new SqlCommand(); cmd4.CommandText = "update KEY_GEN set chemistid=@chemistid"; cmd4.Parameters.AddWithValue("@chemistid", x); db4.execute(cmd4); }
protected void btn1_Click(object sender, EventArgs e) { dbcon db3 = new dbcon(); SqlCommand cmd3 = new SqlCommand(); cmd3.CommandText = "insert into dr_tble values(@dr_id,@Dr_name,@specialization,@place,@pin,@state,@district,@work_in,@lan_line,@mb_no,@email)"; cmd3.Parameters.AddWithValue("@dr_id", txt1.Text); cmd3.Parameters.AddWithValue("@Dr_name", txt2.Text); cmd3.Parameters.AddWithValue("@specialization", txt3.Text); cmd3.Parameters.AddWithValue("@place", txt4.Text); cmd3.Parameters.AddWithValue("@pin", txt5.Text); cmd3.Parameters.AddWithValue("@state", ddl1.SelectedItem.Text); cmd3.Parameters.AddWithValue("@district", ddl2.SelectedItem.Text); cmd3.Parameters.AddWithValue("@work_in", cbl1.SelectedItem.Text); cmd3.Parameters.AddWithValue("@lan_line", txt6.Text); cmd3.Parameters.AddWithValue("@mb_no", txt7.Text); cmd3.Parameters.AddWithValue("@email", txt8.Text); db3.execute(cmd3); dbcon db4 = new dbcon(); SqlCommand cmd4 = new SqlCommand(); cmd4.CommandText = "update KEY_GEN set dr_id=@dr_id"; cmd4.Parameters.AddWithValue("@dr_id", x); db4.execute(cmd4); }
protected void Button1_Click(object sender, EventArgs e) { dbcon db1 = new dbcon(); SqlCommand cmd1 = new SqlCommand(); cmd1.CommandText = "insert into rm_target _tbl values(@tid,@p_name,@packing,@desgn,@target,@area,@month)"; cmd1.Parameters.AddWithValue("@tid", TextBox1.Text); cmd1.Parameters.AddWithValue("@p_name", DropDownList3.SelectedItem.Text); cmd1.Parameters.AddWithValue("@packing", TextBox3.Text); cmd1.Parameters.AddWithValue("@desgn", TextBox5.Text); cmd1.Parameters.AddWithValue("@target", TextBox6.Text); cmd1.Parameters.AddWithValue("@area", TextBox7.Text); cmd1.Parameters.AddWithValue("@month", TextBox8.Text); db1.execute(cmd1); SqlCommand cmd2 = new SqlCommand(); cmd2.CommandText = "update KEY_GEN set productid=@productid"; cmd2.Parameters.AddWithValue("@productid", x); db1.execute(cmd2); }
protected void Button1_Click(object sender, EventArgs e) { dbcon db1 = new dbcon(); SqlCommand cmd1 = new SqlCommand(); cmd1.CommandText = "insert into am_to_pmr_tbl values(@staffid,@s_name,@designation,@state,@am)"; cmd1.Parameters.AddWithValue("@staffid", txt1.Text); cmd1.Parameters.AddWithValue("@s_name", txt2.Text); cmd1.Parameters.AddWithValue("@designation", txt3.Text); cmd1.Parameters.AddWithValue("@state", txt4.Text); cmd1.Parameters.AddWithValue("@am", ddl1.SelectedItem.Text); db1.execute(cmd1); }
protected void Page_Load(object sender, EventArgs e) { dbcon db1 = new dbcon(); string a = Request.QueryString["id"]; SqlCommand cmd3 = new SqlCommand(); cmd3.CommandText = "update pmr_req set status=@a where req_id=@b"; cmd3.Parameters.AddWithValue("@a", "AM"); cmd3.Parameters.AddWithValue("@b", a); db1.execute(cmd3); Response.Redirect("req_approval.aspx"); }
protected void btn1_Click(object sender, EventArgs e) { dbcon db1 = new dbcon(); SqlCommand cmd1 = new SqlCommand(); if (FileUpload1.HasFile) { /*DateTime dt = DateTime.Parse(txt3.Text);*/ string simage = FileUpload1.FileName.ToString(); FileUpload1.PostedFile.SaveAs(Server.MapPath("~/staff/") + simage); cmd1.CommandText = "insert into staff_tbl values(@staffid,@s_name,@image,@dob,@sex,@addrs,@phone,@desgn,@doj,@email,@email2)"; cmd1.Parameters.AddWithValue("@staffid", txt1.Text); cmd1.Parameters.AddWithValue("@s_name", txt2.Text); cmd1.Parameters.AddWithValue("@image", simage); cmd1.Parameters.AddWithValue("@dob", txt3.Text); cmd1.Parameters.AddWithValue("@sex", rbl1.Text); cmd1.Parameters.AddWithValue("@addrs", txta6.Text); cmd1.Parameters.AddWithValue("@phone", txt4.Text); cmd1.Parameters.AddWithValue("@desgn", DropDownList1.SelectedItem.Text); cmd1.Parameters.AddWithValue("@doj", txt5.Text); cmd1.Parameters.AddWithValue("@email", txt7.Text); cmd1.Parameters.AddWithValue("@email2", txt8.Text); db1.execute(cmd1); dbcon db2 = new dbcon(); SqlCommand cmd2 = new SqlCommand(); cmd2.CommandText = "update KEY_GEN set staffid=@staffid"; cmd2.Parameters.AddWithValue("@staffid", x); db2.execute(cmd2); dbcon db3 = new dbcon(); SqlCommand cmd3 = new SqlCommand(); cmd3.CommandText = "insert into login_tbl values (@userid,@pwd,@type)"; cmd3.Parameters.AddWithValue("@userid", txt8.Text); cmd3.Parameters.AddWithValue("@pwd", txt1.Text); cmd3.Parameters.AddWithValue("@type", DropDownList1.SelectedItem.Text); db3.execute(cmd3); Session["staffid"] = txt1.Text; Response.Redirect("OTHER_DETAILS.aspx"); /*Response.Redirect("ADMIN_HOME.aspx");*/ } }
protected void Button1_Click(object sender, EventArgs e) { dbcon db1 = new dbcon(); SqlCommand cmd1 = new SqlCommand(); cmd1.CommandText = "insert into pack_tbl values(@pack_id,@p_type,@quty)"; cmd1.Parameters.AddWithValue("@pack_id", txt1.Text); cmd1.Parameters.AddWithValue("@p_type", txt2.Text); cmd1.Parameters.AddWithValue("quty", txt3.Text); db1.execute(cmd1); dbcon db4 = new dbcon(); SqlCommand cmd4 = new SqlCommand(); cmd4.CommandText = "update KEY_GEN set pack_id=@pack_id"; cmd4.Parameters.AddWithValue("@pack_id", x); db4.execute(cmd4); }
protected void btn1_Click(object sender, EventArgs e) { dbcon db1 = new dbcon(); SqlCommand cmd1 = new SqlCommand(); cmd1.CommandText = "insert into state_tbl values(@scode,@sname,@district)"; cmd1.Parameters.AddWithValue("@scode", txt1.Text); cmd1.Parameters.AddWithValue("@sname", txt2.Text); cmd1.Parameters.AddWithValue("@district", txt3.Text); db1.execute(cmd1); txt2.Text = ""; txt3.Text = ""; dbcon db2 = new dbcon(); SqlCommand cmd2 = new SqlCommand(); cmd2.CommandText = "update KEY_GEN set stateid=@scode"; cmd2.Parameters.AddWithValue("@scode", x); db2.execute(cmd2); }
protected void Button1_Click(object sender, EventArgs e) { dbcon db1 = new dbcon(); SqlCommand cmd1 = new SqlCommand(); cmd1.CommandText = "insert into am_tbl values(@staffid,@s_name,@designation,@state,@district)"; cmd1.Parameters.AddWithValue("@staffid", txt1.Text); cmd1.Parameters.AddWithValue("@s_name", txt2.Text); cmd1.Parameters.AddWithValue("@designation", txt3.Text); cmd1.Parameters.AddWithValue("@state", txt4.Text); cmd1.Parameters.AddWithValue("@district", ddl1.SelectedItem.Text); db1.execute(cmd1); //dbcon db3 = new dbcon(); //SqlCommand cmd3 = new SqlCommand(); //cmd3.CommandText = "insert into login_tbl values (@userid,@pwd,@type)"; //cmd3.Parameters.AddWithValue("@userid", txt2.Text); //cmd3.Parameters.AddWithValue("@pwd", txt1.Text); //cmd3.Parameters.AddWithValue("@type", txt3.Text); //db3.execute(cmd3); }