protected void ImageButton1_Click(object sender, EventArgs e) { ModalPopupExtender9.Hide(); Int32 patyid = 0; if (ViewState["Dltitem"] != null) { //DataTable dtorgeml = new DataTable(); //dtorgeml = clsMaster.SelectPartyIdfromCompanyEmailId(Convert.ToInt32(ViewState["Dltitem"])); ////HttpContext.Current.Session["Company"] = "1"; //if (dtorgeml.Rows.Count > 0) //{ // if (dtorgeml.Rows[0][0] != System.DBNull.Value) // { // patyid = Convert.ToInt32(dtorgeml.Rows[0][0].ToString()); // } //} //MessageCls clsMessage = new MessageCls(); //bool dlt = clsMessage.DeleteCompanyMsgDetailExt(patyid); string result1 = "delete from InOutCompanyEmail where ID='" + ViewState["Dltitem"] + "'"; SqlCommand cmddel = new SqlCommand(result1, con); if (con.State.ToString() != "Open") { con.Open(); } cmddel.ExecuteNonQuery(); con.Close(); FillGrid(); } ViewState["Dltitem"] = ""; }
protected void ImageButton1_Click(object sender, ImageClickEventArgs e) { if (ViewState["folid"] != null) { ModalPopupExtender9.Hide(); DataTable dsa = new DataTable(); dsa = select("Select * from MessageProcessRulesDetail where MovetoFolderID='" + ViewState["folid"] + "'"); if (dsa.Rows.Count == 0) { string result1 = "delete from MessageFolderMaster where ID='" + ViewState["folid"] + "'"; SqlCommand cmddel = new SqlCommand(result1, con); if (con.State.ToString() != "Open") { con.Open(); } cmddel.ExecuteNonQuery(); con.Close(); labelmsg.Text = "Record deleted successfully"; // pnlmsg.Visible = true; Fillgrid(); } else { labelmsg.Text = "This record used in chield table,first deleted chield records"; // pnlmsg.Visible = true; } } }
protected void ibtnCancelCabinetAdd_Click(object sender, EventArgs e) { ModalPopupExtender9.Hide(); }