Exemplo n.º 1
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;
                }
            }
        }
Exemplo n.º 2
0
 public FrmInventory()
 {
     InitializeComponent();
     get_service    = new get_GUI();
     serviceGet     = new ServiceGet();
     InventPrinters = new ArrayList();
     departs        = get_service.GetAllDepartments2(StaticClass.storeId);
     Service.Util.UpdateDataTableForCombo(cmbDept, departs, 2);
     for (int j = 0; j < departs.Rows.Count; j++)
     {
         if (departs.Rows[j][2].Equals("Không phân loại"))
         {
             cmbDept.SelectedIndex = j;
             return;
         }
     }
 }
Exemplo n.º 3
0
 public FrmInventory()
 {
     InitializeComponent();
     get_service=new get_GUI();
     serviceGet = new ServiceGet();
     InventPrinters = new ArrayList();
     departs = get_service.GetAllDepartments2(StaticClass.storeId);
     Service.Util.UpdateDataTableForCombo(cmbDept, departs, 2);
     for (int j = 0; j < departs.Rows.Count; j++)
     {
         if (departs.Rows[j][2].Equals("Không phân loại"))
         {
             cmbDept.SelectedIndex = j;
             return;
         }
     }
 }