Exemplo n.º 1
0
        public FrmQuanLyDanhMuc()
        {
            InitializeComponent();
            services = new get_GUI();

            catagries = services.GetAllCategories(StaticClass.storeId);
            dataBinding();
        }
Exemplo n.º 2
0
        public FrmQuanLyDanhMuc()
        {
            InitializeComponent();
            services=new get_GUI();

            catagries = services.GetAllCategories(StaticClass.storeId);
            dataBinding();
        }
Exemplo n.º 3
0
        private void btn_capnhat_Click(object sender, EventArgs e)
        {
            DataRowView r = (DataRowView)creComboBox1.SelectedItem;

            services.UpdateCategory(r.Row[0].ToString(), StaticClass.storeId, txtMota.Text);
            txtMota.Enabled        = true;
            txtMota.SelectionStart = 0;
            txtMota.Focus();
            txtMota.SelectionLength = txtMota.Text.Length;

            catagries = services.GetAllCategories(StaticClass.storeId);
            limit     = catagries.Rows.Count - 1;
            for (int i = 0; i < catagries.Rows.Count; i++)
            {
                if (catagries.Rows[i][0].Equals(txtMa.Text))
                {
                    currentIndex = i;
                    break;
                }
            }
            dataBinding();
            creComboBox1.SelectedIndex = currentIndex;
        }
Exemplo n.º 4
0
 public FrmDept()
 {
     get_service = new get_GUI();
     InitializeComponent();
     Categories = get_service.GetAllCategories(StaticClass.storeId);
     Service.Util.UpdateDataTableForCombo(cmbCate, Categories, 2);
     for (int j = 0; j < Categories.Rows.Count; j++)
     {
         if (Categories.Rows[j][2].Equals("Không phân loại"))
         {
             cmbCate.SelectedIndex = j;
             return;
         }
     }
 }
Exemplo n.º 5
0
        public FrmDept()
        {
            get_service = new get_GUI();
            InitializeComponent();
            Categories = get_service.GetAllCategories(StaticClass.storeId);
            Service.Util.UpdateDataTableForCombo(cmbCate,Categories, 2);
            for(int j=0;j<Categories.Rows.Count;j++)
            {
                if(Categories.Rows[j][2].Equals("Không phân loại"))
                {
                    cmbCate.SelectedIndex = j;
                    return;
                }
            }

          
        }
Exemplo n.º 6
0
        private void FrmDept_Load(object sender, EventArgs e)
        {
            int i = cmbCate.SelectedIndex;

            DataTable departmentsBysubType = get_service.GetAllDepartmentsBySubType(StaticClass.storeId, get_service.GetAllCategories(StaticClass.storeId).Rows[i][0].ToString());

            changeState(departmentsBysubType, 0);
            departs = get_service.GetAllDepartments2(StaticClass.storeId);
            limit   = departs.Rows.Count - 1;
            //get current index of Cmb in departs
            for (int j = 0; j < departs.Rows.Count; j++)
            {
                DataRowView tmp = (DataRowView)cmbCate.SelectedItem;
                if (tmp.Row[0].Equals(departs.Rows[j][7]))
                {
                    currentIndex = j;
                    break;
                }
            }
        }