private void BindCategory() { DataSet dsCategoryMasterList = CCategorymasterServices.CategorymasterList(); GVReport.DataSource = dsCategoryMasterList; GVReport.DataBind(); }
private void BindGrid() { DataSet dsCategoryMasterList = CCategorymasterServices.CategorymasterList(); gvCategorylist.DataSource = dsCategoryMasterList; gvCategorylist.DataBind(); }
private void BindCategory() { DataSet dsCategoryMasterList = CCategorymasterServices.CategorymasterList(); ListBox1.DataSource = dsCategoryMasterList; ListBox1.DataTextField = "CategoryName"; ListBox1.DataValueField = "CategoryId"; ListBox1.DataBind(); }
public void BindCategoryName() { DataSet dsCategoryMasterList = CCategorymasterServices.CategorymasterList(); droplistcategory.DataSource = dsCategoryMasterList; droplistcategory.DataTextField = "CategoryName"; droplistcategory.DataValueField = "CategoryId"; droplistcategory.DataBind(); }
public void BindCategoryname() { DataSet dsCategoryMasterList = CCategorymasterServices.CategorymasterList(); DropCategoryname.DataSource = dsCategoryMasterList; DropCategoryname.Items.Clear(); DropCategoryname.DataTextField = "Categoryname"; DropCategoryname.DataValueField = "CategoryId"; DropCategoryname.DataBind(); CSubCategoryMaster ObjsubCategory = new CSubCategoryMaster((Convert.ToInt32(DropCategoryname.SelectedValue))); BindSubcategoryname(Convert.ToInt32(ObjsubCategory.CategoryId)); }
protected void ButUpdate_Click(object sender, EventArgs e) { int intReturnValue = CCategorymasterServices.CategoryUpdate(Convert.ToInt32(TxtCategoryId.Text), Convert.ToInt32(TxtCategorycode.Text), TxtCategoryName.Text, Dropstatus.SelectedValue); if (intReturnValue > 0) { lblmsgbox.Text = "Category Update"; BindGrid(); TxtCategoryId.Text = ""; TxtCategorycode.Text = ""; TxtCategoryName.Text = ""; Dropstatus.SelectedValue = ""; lblmsgbox.Text = ""; } else { lblmsgbox.Text = "Error occured while UpDate Category."; } }
protected void ButInsert_Click(object sender, EventArgs e) { int intReturnValue = CCategorymasterServices.CategoryInsert(Convert.ToInt32(TxtCategorycode.Text), TxtCategoryName.Text, Dropstatus.SelectedValue); if (intReturnValue > 0) { lblmsgbox.Text = "Category Insert"; BindGrid(); TxtCategorycode.Text = ""; TxtCategoryName.Text = ""; Dropstatus.SelectedValue = ""; TblAddEdit.Visible = false; } else { lblmsgbox.Text = "Error occured while insering Category."; } }
protected void gvCategorylist_RowDeleting(object sender, GridViewDeleteEventArgs e) { TblAddEdit.Visible = false; ButInsert.Visible = false; ButCancle.Visible = true; ButUpdate.Visible = true; int intCategoryId = Convert.ToInt32(gvCategorylist.DataKeys[e.RowIndex].Value); CCategoryMaster ObjCategory = new CCategoryMaster(intCategoryId); if (ObjCategory.IsExit == true) { //global::System.Windows.Forms.MessageBox.Show("hiiii"); lblmsgbox.Text = "Category Delete"; TxtCategoryId.Text = ObjCategory.CategoryId.ToString(); TxtCategorycode.Text = ObjCategory.CategoryCode.ToString(); TxtCategoryName.Text = ObjCategory.CategoryName; Dropstatus.SelectedValue = ObjCategory.Status; } // int intCategoryId = Convert.ToInt32(gvCategorylist.DataKeys[e.RowIndex].Value); //CCategorymasterServices ObjCategory = new CCategoryMaster(intCategoryId); int intReturnValue = CCategorymasterServices.CategoryDelete(Convert.ToInt32(TxtCategoryId.Text)); if (intReturnValue > 0) { BindGrid(); TxtCategoryId.Text = ""; TxtCategorycode.Text = ""; TxtCategoryName.Text = ""; } else { lblmsgbox.Text = "Error occured while Deleting Data."; } }