private void save() { DECatagory catagory = new DECatagory(); AssignData(catagory); BLLCatagory obj_BLLCatagory = new BLLCatagory(); try { int int_Result = obj_BLLCatagory.InsertData(catagory); if (int_Result > 0) { MessageBox.Show(UIConstantMessage.Const_strSaveSuccessfully); BindDataGridView(); clearScreen(); } } catch (Exception ex) { throw ex; } finally { catagory = null; obj_BLLCatagory = null; } }
private void bindProductCatagoryCombo() { BLLCatagory obj_BLLCatagory = new BLLCatagory(); DataTable dt_Catagory = obj_BLLCatagory.LoadCatagoryTableForAllData(); cbx_Catagory.Items.Clear(); cbx_Catagory.LoadingType = MTGCComboBox.CaricamentoCombo.DataTable; cbx_Catagory.SourceDataString = new string[] { "Catagory_Description", "Catagory_Id", "Catagory_Id", "Catagory_Id" }; cbx_Catagory.ColumnNum = 3; cbx_Catagory.ColumnWidth = "150;0;0,0"; cbx_Catagory.SourceDataTable = dt_Catagory; cbx_Catagory.Text = string.Empty; }
private void dgv_Catagory_DoubleClick(object sender, EventArgs e) { DECatagory catagory = new DECatagory(); catagory.Catagory_Id = Convert.ToInt32(dgv_Catagory.CurrentRow.Cells[1].Value); BLLCatagory obj_BLLCatagory = new BLLCatagory(); bool bool_Result = obj_BLLCatagory.LoadCatagoryRow(catagory); if (bool_Result == true) { DisplayData(catagory); } else { MessageBox.Show("Record is not found."); } catagory = null; obj_BLLCatagory = null; }
private void BindDataGridView() { DECatagory catagory = new DECatagory(); BLLCatagory obj_BLLCatagory = new BLLCatagory(); DataTable dt_Catagory; if (txt_FilteredDescription.Text.Trim().Length <= 0) { dt_Catagory = obj_BLLCatagory.LoadCatagoryTableForAllData(); } else { catagory.Catagory_Description = txt_FilteredDescription.Text; dt_Catagory = obj_BLLCatagory.LoadCatagoryTableForAllDataByCatagoryDescription(catagory); } dgv_Catagory.DataSource = dt_Catagory; NumberingTableForDataGridView(dt_Catagory); FormatDataGridView(); }