Exemple #1
0
 internal void SaveIntoOriginal(LC_Size aLC_Size)
 {
     using (var _Context = new ERPSSL_MerchandisingEntities())
     {
         _Context.LC_Size.AddObject(aLC_Size);
         _Context.SaveChanges();
     }
 }
Exemple #2
0
 internal int Save_LC_To_Temp(LC_Size_Temp aLC_Size_Temp)
 {
     using (var _Context = new ERPSSL_MerchandisingEntities())
     {
         _Context.LC_Size_Temp.AddObject(aLC_Size_Temp);
         _Context.SaveChanges();
         return(aLC_Size_Temp.Size_Id);
     }
 }
 internal int SaveCategory(LC_StyleCategor aLC_StyleCategor)
 {
     using (var _Context = new ERPSSL_MerchandisingEntities())
     {
         _Context.LC_StyleCategor.AddObject(aLC_StyleCategor);
         _Context.SaveChanges();
         return(aLC_StyleCategor.Style_Category_Id);
     }
 }
Exemple #4
0
 internal int SaveGMTItems(LC_GmtItem aLC_GmtItem)
 {
     using (var _Context = new ERPSSL_MerchandisingEntities())
     {
         _Context.LC_GmtItem.AddObject(aLC_GmtItem);
         _Context.SaveChanges();
         return(aLC_GmtItem.GmtItem_Id);
     }
 }
 internal int SaveBuyerDepartment(LC_BuyerDepartment aLC_BuyerDepartment)
 {
     using (var _Context = new ERPSSL_MerchandisingEntities())
     {
         _Context.LC_BuyerDepartment.AddObject(aLC_BuyerDepartment);
         _Context.SaveChanges();
         return(aLC_BuyerDepartment.BuyerDepartment_Id);
     }
 }
 internal int SaveSeasion(LC_Season aLC_Season)
 {
     using (var _Context = new ERPSSL_MerchandisingEntities())
     {
         _Context.LC_Season.AddObject(aLC_Season);
         _Context.SaveChanges();
         return(aLC_Season.Season_Id);
     }
 }
 internal int SaveStyle(LC_Style aLC_Style)
 {
     using (var _Context = new ERPSSL_MerchandisingEntities())
     {
         _Context.LC_Style.AddObject(aLC_Style);
         _Context.SaveChanges();
         return(aLC_Style.StyleId);
     }
 }
 public static List <string> SearchOrderNo(string prefixText, int count)
 {
     using (var _context = new ERPSSL_MerchandisingEntities())
     {
         var allOrder = from m in _context.LC_OrderEntry
                        where ((m.OrderNo.Contains(prefixText)))
                        select m;
         List <String> orderList = new List <String>();
         foreach (var orders in allOrder)
         {
             orderList.Add(orders.OrderNo);
         }
         return(orderList);
     }
 }
 public static List <string> SearchComposition(string prefixText, int count)
 {
     using (var _context = new ERPSSL_MerchandisingEntities())
     {
         var allClient = from m in _context.LC_Composition
                         where ((m.Composition.Contains(prefixText)))
                         select m;
         List <String> clientList = new List <String>();
         foreach (var clientName in allClient)
         {
             clientList.Add(clientName.Composition);
         }
         return(clientList);
     }
 }
 internal int SaveOrderEntry(LC_OrderEntry aLC_OrderEntry)
 {
     try
     {
         using (var _Context = new ERPSSL_MerchandisingEntities())
         {
             _Context.LC_OrderEntry.AddObject(aLC_OrderEntry);
             _Context.SaveChanges();
             return(1);
         }
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
Exemple #11
0
        internal List <YarnDeterminationShowRepo> GetAllInformationOfGridView(string OCODE)
        {
            try
            {
                using (var _context = new ERPSSL_MerchandisingEntities())
                {
                    var _OCode = new SqlParameter("@OCODE", OCODE);

                    string SP_SQL = "LC_YarnCostShow @OCODE";
                    return((_context.ExecuteStoreQuery <YarnDeterminationShowRepo>(SP_SQL, _OCode)).ToList());
                }
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
Exemple #12
0
        internal List <YarnDeterminationReportRepo> GetAllInformationOfYD(string OCODE, Guid userIdEccess)
        {
            try
            {
                using (var _context = new ERPSSL_MerchandisingEntities())
                {
                    var _OCode      = new SqlParameter("@OCODE", OCODE);
                    var _CreateUser = new SqlParameter("@CreateUser", userIdEccess);

                    string SP_SQL = "LC_RPT_YarnDetermination @OCODE, @CreateUser";
                    return((_context.ExecuteStoreQuery <YarnDeterminationReportRepo>(SP_SQL, _OCode, _CreateUser)).ToList());
                }
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
Exemple #13
0
        internal List <YarnDeterminationShowRepo> GetAllInformationOfGridViewByComposition(string OCODE, int compositionId, Guid createUser)
        {
            try
            {
                using (var _context = new ERPSSL_MerchandisingEntities())
                {
                    var _OCode          = new SqlParameter("@OCODE", OCODE);
                    var _ConstructionId = new SqlParameter("@CompositionId", compositionId);
                    var _CreateUser     = new SqlParameter("@CreateUser", createUser);

                    string SP_SQL = "LC_YarnCostShowByComposition @OCODE, @CompositionId, @CreateUser";
                    return((_context.ExecuteStoreQuery <YarnDeterminationShowRepo>(SP_SQL, _OCode, _ConstructionId, _CreateUser)).ToList());
                }
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
        private bool IsExist(string Cname)
        {
            try
            {
                ERPSSL_MerchandisingEntities _context = new ERPSSL_MerchandisingEntities();

                LC_Color objColor = new LC_Color();

                bool status = false;
                int  count  = (from col in _context.LC_Color
                               where col.ColorName == Cname
                               select col.ColorId).Count();
                if (count == 0)
                {
                    status = true;
                }

                return(status);
            }
            catch (Exception)
            {
                throw;
            }
        }
        private bool IsExist(string yarnCount)
        {
            try
            {
                ERPSSL_MerchandisingEntities _context = new ERPSSL_MerchandisingEntities();

                LC_Yarn_Count objYarn = new LC_Yarn_Count();

                bool status = false;
                int  count  = (from yarn in _context.LC_Yarn_Count
                               where yarn.Yarn_Count == yarnCount
                               select yarn.YarnCount_ID).Count();
                if (count == 0)
                {
                    status = true;
                }

                return(status);
            }
            catch (Exception)
            {
                throw;
            }
        }