예제 #1
0
        public static List <contact> GetBatchCodeBySKU(object objReq)
        {
            iCycleCountClient cycle   = new iCycleCountClient();
            CustomProfile     profile = CustomProfile.GetProfile();
            DataSet           ds      = new DataSet();
            DataTable         dt      = new DataTable();
            List <contact>    LocList = new List <contact>();

            try
            {
                Dictionary <string, object> dictionary = new Dictionary <string, object>();
                dictionary = (Dictionary <string, object>)objReq;

                long WarehouseID = long.Parse(dictionary["WarehouseID"].ToString());
                long SKUID       = long.Parse(dictionary["SKUID"].ToString());
                long locationID  = long.Parse(dictionary["locationID"].ToString());

                //ds = StatutoryClient.GetCustomerList(ddlcompanyId, profile.DBConnection._constr);
                ds = cycle.GetBatchCodeBySKU(SKUID, locationID, profile.DBConnection._constr);
                dt = ds.Tables[0];
                contact Loc = new contact();
                Loc.Name = "--Select--";
                Loc.Id   = "0";
                LocList.Add(Loc);
                Loc = new contact();
                if (dt.Rows.Count > 0)
                {
                    for (int i = 0; i < dt.Rows.Count; i++)
                    {
                        Loc.Id   = dt.Rows[i]["ID"].ToString();
                        Loc.Name = dt.Rows[i]["BatchCode"].ToString();
                        LocList.Add(Loc);
                        Loc = new contact();
                    }
                }
            }
            catch
            {
            }
            finally
            {
                cycle.Close();
            }
            return(LocList);
        }