コード例 #1
0
 internal int UpdateRequisitionApprovedStatus(List <LC_Requisition> details)
 {
     foreach (LC_Requisition item in details)
     {
         var result = _Context.LC_Requisition.Where(x => x.ProductId == item.ProductId && x.LC_ReqNo == item.LC_ReqNo).FirstOrDefault();
         result.Req_Approve_Date = item.Req_Approve_Date;
         result.Req_ApprovedQty  = item.Req_ApprovedQty;
         result.IsReqApproved    = true;
         _Context.SaveChanges();
     }
     return(1);
 }
コード例 #2
0
 internal int Insert(LC_SampleDetails _ObjSampleDetails)
 {
     try
     {
         _Context.LC_SampleDetails.AddObject(_ObjSampleDetails);
         _Context.SaveChanges();
         return(1);
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
コード例 #3
0
ファイル: BrandDAL.cs プロジェクト: Denar87/Asp.Net-Source
 internal int InsertStyle(LC_Brand _lcBrand)
 {
     try
     {
         _Context.LC_Brand.AddObject(_lcBrand);
         _Context.SaveChanges();
         return(1);
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
コード例 #4
0
 internal int InsertPrincipal(LC_Principal _ObjPrincipal)
 {
     try
     {
         _Context.LC_Principal.AddObject(_ObjPrincipal);
         _Context.SaveChanges();
         return(1);
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
コード例 #5
0
ファイル: CuttingDAL.cs プロジェクト: Denar87/Asp.Net-Source
 internal int InsertProdCutting(Prod_Cutting _objProdCutting)
 {
     try
     {
         _Context.Prod_Cutting.AddObject(_objProdCutting);
         _Context.SaveChanges();
         return(1);
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
コード例 #6
0
ファイル: TnaDAL.cs プロジェクト: Denar87/Asp.Net-Source
 internal int Insert(Prod_TNA _ObjProdTna)
 {
     try
     {
         _Context.Prod_TNA.AddObject(_ObjProdTna);
         _Context.SaveChanges();
         return(1);
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
コード例 #7
0
 internal int InsertFactory(LC_Factory _lcFactory)
 {
     try
     {
         _Content.LC_Factory.AddObject(_lcFactory);
         _Content.SaveChanges();
         return(1);
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
コード例 #8
0
 internal int Save(List <LC_CostEstimateDetails> details)
 {
     try
     {
         foreach (LC_CostEstimateDetails item in details)
         {
             _Content.LC_CostEstimateDetails.AddObject(item);
             _Content.SaveChanges();
         }
         return(1);
     }
     catch (Exception)
     {
         throw;
     }
 }
コード例 #9
0
 internal int UpdateLCOrderPlanning(List <LC_Order_Planning_Temp> _LC_Order_Planning)
 {
     using (var _Context = new ERPSSL_LCEntities())
     {
         foreach (LC_Order_Planning_Temp aitem in _LC_Order_Planning)
         {
             LC_Order_Planning_Temp planning = new LC_Order_Planning_Temp();
             planning.OrderNo             = aitem.OrderNo;
             planning.BarCode             = aitem.BarCode;
             planning.ProductId           = aitem.ProductId;
             planning.ProductName         = aitem.ProductName;
             planning.StyleSize           = aitem.StyleSize;
             planning.Season              = aitem.Season;
             planning.Brand               = aitem.Brand;
             planning.OCode               = aitem.OCode;
             planning.CreateUser          = aitem.CreateUser;
             planning.CPU                 = aitem.CPU;
             planning.Qty                 = aitem.Qty;
             planning.UnitName            = aitem.UnitName;
             planning.OrderPlanningAutoId = aitem.OrderPlanningAutoId;
             planning.Style               = aitem.Style;
             planning.TotalQty            = aitem.TotalQty;
             planning.USDRate             = aitem.USDRate;
             planning.USDValue            = aitem.USDValue;
             planning.BDTRate             = aitem.BDTRate;
             planning.BDTValue            = aitem.BDTValue;
             planning.Article             = aitem.Article;
             _Context.LC_Order_Planning_Temp.AddObject(planning);
             _Context.SaveChanges();
         }
         return(1);
     }
 }
コード例 #10
0
        internal int UpdateInvoiceTemp(List <LC_Invoice_CreateTemp> _LC_Invoice_CreateTemp)
        {
            try
            {
                using (var _Context = new ERPSSL_LCEntities())
                {
                    foreach (LC_Invoice_CreateTemp aitem in _LC_Invoice_CreateTemp)
                    {
                        LC_Invoice_CreateTemp InvoiceT = new LC_Invoice_CreateTemp();
                        InvoiceT.InvoiceNo          = aitem.InvoiceNo;
                        InvoiceT.InvoiceDate        = aitem.InvoiceDate;
                        InvoiceT.BayerId            = aitem.BayerId;
                        InvoiceT.Consignee          = aitem.Consignee;
                        InvoiceT.NotifyParty        = aitem.NotifyParty;
                        InvoiceT.EXPNo              = aitem.EXPNo;
                        InvoiceT.EXPDate            = aitem.EXPDate;
                        InvoiceT.LCNo               = aitem.LCNo;
                        InvoiceT.LCDate             = aitem.LCDate;
                        InvoiceT.IssuingBank        = aitem.IssuingBank;
                        InvoiceT.DeliveryAddress    = aitem.DeliveryAddress;
                        InvoiceT.OriginatedCountry  = aitem.OriginatedCountry;
                        InvoiceT.Destination        = aitem.Destination;
                        InvoiceT.MarksNumbers       = aitem.MarksNumbers;
                        InvoiceT.ContainerNo        = aitem.ContainerNo;
                        InvoiceT.BuyingDept         = aitem.BuyingDept;
                        InvoiceT.NoKindofPackages   = aitem.NoKindofPackages;
                        InvoiceT.Remarks            = aitem.Remarks;
                        InvoiceT.Season             = aitem.Season;
                        InvoiceT.OrderNo            = aitem.OrderNo;
                        InvoiceT.Article            = aitem.Article;
                        InvoiceT.ColorSpecification = aitem.ColorSpecification;
                        InvoiceT.Style              = aitem.Style;
                        InvoiceT.OrderQty           = aitem.OrderQty;
                        InvoiceT.CAT_No             = aitem.CAT_No;
                        InvoiceT.H_S_Code           = aitem.H_S_Code;
                        InvoiceT.OrderQty           = aitem.OrderQty;
                        InvoiceT.UnitId             = aitem.UnitId;
                        InvoiceT.UnitPrice          = aitem.UnitPrice;
                        InvoiceT.Currency_Type      = aitem.Currency_Type;
                        InvoiceT.Total              = aitem.Total;
                        InvoiceT.CreateUser         = aitem.CreateUser;
                        InvoiceT.CreateDate         = aitem.CreateDate;
                        InvoiceT.OCode              = aitem.OCode;

                        _Context.LC_Invoice_CreateTemp.AddObject(InvoiceT);
                        _Context.SaveChanges();
                    }
                    return(1);
                }
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
コード例 #11
0
ファイル: InvoiceDAL.cs プロジェクト: Denar87/Asp.Net-Source
 internal int Insert(LC_Invoice_Create objInvoice)
 {
     try
     {
         _Context.LC_Invoice_Create.AddObject(objInvoice);
         _Context.SaveChanges();
         return(1);
     }
     catch (Exception)
     {
         throw;
     }
 }
コード例 #12
0
 internal int InsertProductionDetails(Prod_ProductionStatusDetails _objProductionStatusDetails)
 {
     try
     {
         _Context.Prod_ProductionStatusDetails.AddObject(_objProductionStatusDetails);
         _Context.SaveChanges();
         return(1);
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
コード例 #13
0
 internal int BackToBackApprove(List <LC_BackToBack> lstLC_BackToBack)
 {
     try
     {
         foreach (LC_BackToBack aReq in lstLC_BackToBack)
         {
             LC_BackToBack obj = _Context.LC_BackToBack.First(x => x.B2BId == aReq.B2BId);
             obj.ApproveDate   = aReq.ApproveDate;
             obj.ApproveNo     = aReq.ApproveNo;
             obj.ApproveStatus = aReq.ApproveStatus;
             obj.EditDate      = DateTime.Today;
             obj.EditUser      = aReq.EditUser;
             _Context.SaveChanges();
         }
         _Context.SaveChanges();
         return(1);
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
コード例 #14
0
 internal int SavePlan(Prod_Planning _Prod_Planning)
 {
     try
     {
         using (var _context = new ERPSSL_LCEntities())
         {
             _context.AddToProd_Planning(_Prod_Planning);
             _context.SaveChanges();
             return(1);
         }
     }
     catch (Exception)
     {
         throw;
     }
 }
コード例 #15
0
 internal int InsertInputType(LC_InputType InputTypeObj)
 {
     try
     {
         using (var context = new ERPSSL_LCEntities())
         {
             context.LC_InputType.AddObject(InputTypeObj);
             context.SaveChanges();
             return(1);
         }
     }
     catch (Exception ex)
     {
         throw new Exception(ex.Message.ToString());
     }
 }
コード例 #16
0
 internal int AddLineAllocation(Prod_LineAllocationTemp _LineAllocationTemp)
 {
     try
     {
         using (var _context = new ERPSSL_LCEntities())
         {
             _context.AddToProd_LineAllocationTemp(_LineAllocationTemp);
             _context.SaveChanges();
             return(1);
         }
     }
     catch (Exception)
     {
         throw;
     }
 }
コード例 #17
0
 internal int UpdateOrder(String orderEntry, LC_OrderEntry orderObj)
 {
     try
     {
         LC_OrderEntry ObjLOrder = _Content.LC_OrderEntry.First(x => x.OrderNo == orderEntry);
         ObjLOrder.ExtendShipmentDate = orderObj.ExtendShipmentDate;
         ObjLOrder.Shipment_Mode      = orderObj.Shipment_Mode;
         ObjLOrder.ShipmentCompStatus = orderObj.ShipmentCompStatus;
         ObjLOrder.CompShipmentDate   = orderObj.CompShipmentDate;
         _Content.SaveChanges();
         return(1);
     }
     catch (Exception)
     {
         throw;
     }
 }
コード例 #18
0
 internal int InsertBackToBack(List <LC_BackToBack_Temp> _LC_BackToBack)
 {
     using (var _Context = new ERPSSL_LCEntities())
     {
         foreach (LC_BackToBack_Temp aitem in _LC_BackToBack)
         {
             LC_BackToBack_Temp planning = new LC_BackToBack_Temp();
             planning.POOrderNo         = aitem.POOrderNo;
             planning.Barcode           = aitem.Barcode;
             planning.ProductId         = aitem.ProductId;
             planning.ProductName       = aitem.ProductName;
             planning.StyleSize         = aitem.StyleSize;
             planning.Season            = aitem.Season;
             planning.Brand             = aitem.Brand;
             planning.OCode             = aitem.OCode;
             planning.CreateUser        = aitem.CreateUser;
             planning.CPU               = aitem.CPU;
             planning.ReqQty            = aitem.ReqQty;
             planning.BBLCAutoId        = aitem.BBLCAutoId;
             planning.Style             = aitem.Style;
             planning.MasterLC          = aitem.MasterLC;
             planning.PI                = aitem.PI;
             planning.Unit              = aitem.Unit;
             planning.PIDate            = aitem.PIDate;
             planning.B2BLCNo           = aitem.B2BLCNo;
             planning.ExpireDate        = aitem.ExpireDate;
             planning.BBLCDate          = aitem.BBLCDate;
             planning.ProductGroupId    = aitem.ProductGroupId;
             planning.BDTRate           = aitem.BDTRate;
             planning.BDTValue          = aitem.BDTValue;
             planning.USDRate           = aitem.USDRate;
             planning.USDValue          = aitem.USDValue;
             planning.BayerType         = aitem.BayerType;
             planning.SightDaysInterest = aitem.SightDaysInterest;
             planning.BBLCShipmentDate  = aitem.BBLCShipmentDate;
             planning.SupplierId        = aitem.SupplierId;
             planning.Article           = aitem.Article;
             _Context.LC_BackToBack_Temp.AddObject(planning);
             _Context.SaveChanges();
         }
         return(1);
     }
 }
コード例 #19
0
        internal int UpdateInputType(LC_InputType InputTypeObj, int itemID)
        {
            try
            {
                using (var Context = new ERPSSL_LCEntities())
                {
                    LC_InputType ObjLC_MasterLC = Context.LC_InputType.FirstOrDefault(x => x.InputType_Id == itemID);
                    ObjLC_MasterLC.Use_Dept   = InputTypeObj.Use_Dept;
                    ObjLC_MasterLC.Input_Name = InputTypeObj.Input_Name;
                    ObjLC_MasterLC.Sl_No      = InputTypeObj.Sl_No;

                    Context.SaveChanges();
                    return(1);
                }
            }
            catch (Exception ex)
            {
                throw new Exception(ex.Message.ToString());
            }
        }
コード例 #20
0
ファイル: BuyerDAL.cs プロジェクト: Denar87/Asp.Net-Source
 internal int Save(Com_Buyer_Setup _buyerobj)
 {
     try
     {
         _Content.Com_Buyer_Setup.AddObject(_buyerobj);
         _Content.SaveChanges();
         return(1);
     }
     catch (Exception)
     {
         throw;
     }
 }
コード例 #21
0
ファイル: New_UserDAL.cs プロジェクト: Denar87/Asp.Net-Source
 internal int SaveAsset_User(HRM_PersonalInformations _personalInfo)
 {
     _db.HRM_PersonalInformations.AddObject(_personalInfo);
     _db.SaveChanges();
     return(1);
 }