protected void btnRequest_Click(object sender, EventArgs e) { try { if (Session["CheckRefresh"].ToString() == ViewState["CheckRefresh"].ToString()) { Session["CheckRefresh"] = Server.UrlDecode(System.DateTime.Now.ToString()); BOSecondCategory _boscat = new BOSecondCategory(); BASecondCategory _bascat = new BASecondCategory(); _boscat.SecondCategoryName = txtcategory.Text; _boscat.TopCategoryId = Convert.ToInt32(drpTopcategory.SelectedValue); _boscat.IsActive = false; _boscat.IsDelete = false; _boscat.CreatedBy = merchantId; _boscat.CreatedDate = DateTime.UtcNow; _boscat.UpdatedBy = merchantId; _boscat.UpdatedDate = DateTime.UtcNow; _boscat.Event = "Insert"; int result = _bascat.Insert(_boscat); if (result == 1) { ShowMessage("Category added successfully", MessageType.Success); } } } catch (Exception ex) { Common.LogError(ex); ShowMessage("Some technical error", MessageType.Warning); } txtcategory.Text = ""; }
private DataTable FillddlSecondCategory(string value) { BASecondCategory bascat = new BASecondCategory(); DataTable _datatable3 = new DataTable(); _datatable3 = bascat.SelectSecondCategoryList("GetWithTopCatId", value); return(_datatable3); }
private void FilldropDownSecondCategory(string topcatid) { BASecondCategory _baseccat = new BASecondCategory(); DataTable _dt = new DataTable(); _dt = _baseccat.SelectSecondCategoryList("GetWithTopCatId", topcatid); drpSecondCategory.DataTextField = "SecondCategoryName"; drpSecondCategory.DataValueField = "SecondCategoryID"; drpSecondCategory.DataSource = _dt; drpSecondCategory.DataBind(); }
private void FillSecondddlCategory(string value) { BASecondCategory bascat = new BASecondCategory(); DataTable _datatable3 = new DataTable(); _datatable3 = bascat.SelectSecondCategoryList("GetWithTopCatId", value); ddlSecondCategory.DataTextField = "SecondCategoryName"; ddlSecondCategory.DataValueField = "SecondCategoryId"; ddlSecondCategory.DataSource = _datatable3; ddlSecondCategory.DataBind(); FillchkboxListExam(Convert.ToInt32(ddlSecondCategory.SelectedItem.Value), MerchantId); }