Esempio n. 1
0
 internal int SaveData(LC_Composition aLC_Composition)
 {
     try
     {
         _Context.LC_Composition.AddObject(aLC_Composition);
         _Context.SaveChanges();
         return(1);
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
Esempio n. 2
0
 internal int SaveData(LC_YarnCountType aLC_YarnCountType)
 {
     try
     {
         _Context.LC_YarnCountType.AddObject(aLC_YarnCountType);
         _Context.SaveChanges();
         return(1);
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
Esempio n. 3
0
 internal int SaveData(LC_FabricNature aLC_FabricNature)
 {
     try
     {
         _Context.LC_FabricNature.AddObject(aLC_FabricNature);
         _Context.SaveChanges();
         return(1);
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
Esempio n. 4
0
 internal int InsertColor(LC_Color objColor)
 {
     try
     {
         _context.LC_Color.AddObject(objColor);
         _context.SaveChanges();
         return(1);
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
Esempio n. 5
0
 internal int InsertYarnCount(LC_Yarn_Count objYarn)
 {
     try
     {
         _context.LC_Yarn_Count.AddObject(objYarn);
         _context.SaveChanges();
         return(1);
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
Esempio n. 6
0
 internal int SaveData(LC_YarnDeterminationTemp aLC_YarnDeterminationTemp)
 {
     try
     {
         _Context.LC_YarnDeterminationTemp.AddObject(aLC_YarnDeterminationTemp);
         _Context.SaveChanges();
         return(1);
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
Esempio n. 7
0
 internal void SaveIntoOriginal(LC_Size aLC_Size)
 {
     using (var _Context = new ERPSSL_MerchandisingEntities())
     {
         _Context.LC_Size.AddObject(aLC_Size);
         _Context.SaveChanges();
     }
 }
Esempio n. 8
0
        internal int DeleteItem(int id)
        {
            LC_Size_Temp Fl = _Context.LC_Size_Temp.First(x => x.Size_Id == id);

            _Context.LC_Size_Temp.DeleteObject(Fl);
            _Context.SaveChanges();
            return(1);
        }
Esempio n. 9
0
 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);
     }
 }
Esempio n. 10
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);
     }
 }
Esempio n. 11
0
 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);
     }
 }
Esempio n. 12
0
 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);
     }
 }
Esempio n. 13
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);
     }
 }
Esempio n. 14
0
 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);
     }
 }
Esempio n. 15
0
 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;
     }
 }
Esempio n. 16
0
        internal int UpdateTwoInfo(LC_OrderEntry aLC_OrderEntry, string orderNo)
        {
            try
            {
                LC_OrderEntry LC_OrderEntry = _Context.LC_OrderEntry.First(x => x.OrderNo == orderNo);

                LC_OrderEntry.SMV        = aLC_OrderEntry.SMV;
                LC_OrderEntry.Efficiency = aLC_OrderEntry.Efficiency;
                _Context.SaveChanges();
                return(1);
            }
            catch (Exception)
            {
                throw;
            }
        }
        public void GetDates(int year, int month)
        {
            List <LC_tbl_DateTemp> _DateAdd = new List <LC_tbl_DateTemp>();

            string OCode = ((SessionUser)Session["SessionUser"]).OCode;

            for (var date = new DateTime(year, month, 1); date.Month == month; date = date.AddDays(1))
            {
                LC_tbl_DateTemp _DD = new LC_tbl_DateTemp();
                _DD.Datetime = date;
                _DD.OCode    = OCode;
                _DateAdd.Add(_DD);
            }
            foreach (var item in _DateAdd)
            {
                _Context.LC_tbl_DateTemp.AddObject(item);
            }
            _Context.SaveChanges();
            showDateGrid();
        }
Esempio n. 18
0
 internal int SaveBodyPart(LC_BodyPart _BodyParts)
 {
     _Context.LC_BodyPart.AddObject(_BodyParts);
     _Context.SaveChanges();
     return(1);
 }