示例#1
0
        private void save()
        {
            DECustomerCategory catagory = new DECustomerCategory();

            AssignData(catagory);

            BLLCustomerCategory obj_BLLCatagory = new BLLCustomerCategory();

            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;
            }
        }
示例#2
0
        private void bindCsutomerGroupCombo()
        {
            BLLCustomerCategory obj_BLLCatagory = new BLLCustomerCategory();
            DataTable           dt_Catagory     = obj_BLLCatagory.LoadCatagoryTableForAllData();

            cbx_CustomerGroup.Items.Clear();
            cbx_CustomerGroup.LoadingType      = MTGCComboBox.CaricamentoCombo.DataTable;
            cbx_CustomerGroup.SourceDataString = new string[] { "Catagory_Description", "Catagory_Id", "Catagory_Id", "Catagory_Id" };
            cbx_CustomerGroup.ColumnNum        = 3;
            cbx_CustomerGroup.ColumnWidth      = "150;0;0,0";
            cbx_CustomerGroup.SourceDataTable  = dt_Catagory;

            cbx_CustomerGroup.Text = string.Empty;
        }
示例#3
0
        private void dgv_Catagory_DoubleClick(object sender, EventArgs e)
        {
            DECustomerCategory catagory = new DECustomerCategory();

            catagory.Catagory_Id = Convert.ToInt32(dgv_Catagory.CurrentRow.Cells[1].Value);

            BLLCustomerCategory obj_BLLCatagory = new BLLCustomerCategory();
            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;
        }
示例#4
0
        private void BindDataGridView()
        {
            DECustomerCategory catagory = new DECustomerCategory();

            BLLCustomerCategory obj_BLLCatagory = new BLLCustomerCategory();

            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();
        }