protected void Save_Click(object sender, EventArgs e) { check(); try { if (validate()) { dt = new DataTable(); objBE.Dept = Session["Department"].ToString(); objBE.CatName = txttype.Text.Trim(); objBE.Action = "I"; dt = ObjDL.CategoryIUDR(objBE, con); if (dt.Rows.Count > 0) { ObjCommon.ShowAlertMessage("Save failed, please try again"); BindGrid(); } else { ObjCommon.ShowAlertMessage("Your data has been successfully saved"); BindGrid(); txttype.Text = ""; } } } catch (Exception ex) { ExceptionLogging.SendExcepToDB(ex, Session["UserId"].ToString(), Request.ServerVariables["REMOTE_ADDR"].ToString()); Response.Redirect("../Error.aspx"); } }
protected void BindCategory() { dt = new DataTable(); objBE.Dept = Session["Department"].ToString(); objBE.Action = "R"; dt = ObjDL.CategoryIUDR(objBE, con); ObjCommon.BindDropDownLists(ddlSamCat, dt, "category_name", "category_id", "Select"); }
protected void Bindsamplecategory() { check(); dt = new DataTable(); objMBE.Dept = Session["Department"].ToString(); objMBE.Action = "R"; dt = ObjDL.CategoryIUDR(objMBE, con); if (dt.Rows.Count > 0) { cf.BindDropDownLists(ddlsamplecategory, dt, "category_name", "category_id", "Select"); } }