Exemplo n.º 1
0
        public static Boolean varifyLocationEmpMapping(string loc, string EmpID)
        {
            Boolean                status  = false;
            StoreEmpMappingDB      smpdb   = new StoreEmpMappingDB();
            List <storeempmapping> LocList = smpdb.getStockEmpMapping();

            foreach (storeempmapping smp in LocList)
            {
                if (smp.StoreLocationID == loc)
                {
                    if (smp.EmployeeID == EmpID)
                    {
                        return(true);
                    }
                }
            }
            return(status);
        }
Exemplo n.º 2
0
        public static void fillLocationCombo(ComboBox cmb)
        {
            StoreEmpMappingDB      smpdb   = new StoreEmpMappingDB();
            List <storeempmapping> LocList = smpdb.getStockEmpMapping();

            foreach (storeempmapping smp in LocList)
            {
                Boolean status = true;
                foreach (string itm in cmb.Items)
                {
                    if (itm == smp.StoreLocationID + "-" + smp.Description)
                    {
                        status = false;
                    }
                }
                if (status)
                {
                    cmb.Items.Add(smp.StoreLocationID + "-" + smp.Description);
                }
            }
        }
Exemplo n.º 3
0
        public static void fillLocationComboNew(ComboBox cmb)
        {
            StoreEmpMappingDB      smpdb   = new StoreEmpMappingDB();
            List <storeempmapping> LocList = smpdb.getStockEmpMapping();

            foreach (storeempmapping smp in LocList)
            {
                Boolean status = true;
                foreach (Structures.ComboBoxItem itm in cmb.Items)
                {
                    if ((itm.HiddenValue + "-" + itm.ToString()).Equals(smp.StoreLocationID + "-" + smp.Description))
                    {
                        status = false;
                    }
                }
                if (status)
                {
                    Structures.ComboBoxItem cbitem =
                        new Structures.ComboBoxItem(smp.Description, smp.StoreLocationID);
                    cmb.Items.Add(cbitem);
                    //cmb.Items.Add(smp.StoreLocationID + "-" + smp.Description);
                }
            }
        }