internal List <OrderDetails> GetOrdersDetailsByOrderNo(string orderNo, string OCODE) { try { using (var _Context = new ERPSSL_LCEntities()) { List <OrderDetails> result = (from cs in _Context.LC_CostEstimateSummary join cb in _Context.Com_Buyer_Setup on cs.Buyer_ID equals cb.Buyer_ID join lf in _Context.LC_FinishGoods on cs.FinishedGoods_ID equals lf.FinishGoods_Id join iu in _Context.Inv_Unit on cs.ProductUnit equals iu.UnitId where cs.OCode == OCODE && cs.Lc_Order == orderNo select new OrderDetails { Id = cs.Id, ProductUnit = cs.ProductUnit, UnitId = iu.UnitId, UnitName = iu.UnitName, Lc_Order = cs.Lc_Order, Buyer_ID = cs.Buyer_ID, BuyerName = cb.Buyer_Name, OrderDate = cs.OrderDate, FinishedGoodsName = lf.FinishGoods_Name, FinishedGoods_ID = cs.FinishedGoods_ID, FinishedGoods_Qty = cs.FinishedGoods_Qty, }).ToList(); return(result); } } catch (Exception) { throw; } }
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); } }
internal List <CuttingDetailsR> GetCuttingDetails(string OCODE) { try { using (var _Context = new ERPSSL_LCEntities()) { List <CuttingDetailsR> result = (from c in _Context.Prod_Cutting join iu in _Context.Inv_Unit on c.CuttingReceivedUnit equals iu.UnitId where c.OCode == OCODE select new CuttingDetailsR { ID = c.ID, OrderNo = c.OrderNo, OrderQty = c.OrderQty, GoodsName = c.GoodsName, FGoodsQty = c.FGoodsQty, FGoodsUnit = c.FGoodsUnit, CuttingReceivedDate = c.CuttingReceivedDate, CuttingReceivedQty = c.CuttingReceivedQty, CuttingReceivedUnit = c.CuttingReceivedUnit, CuttingCompleteDate = c.CuttingCompleteDate, TotalCuttingCompleteQty = c.TotalCuttingCompleteQty, TotalCuttingCompleteUnit = c.TotalCuttingCompleteUnit, UnitId = iu.UnitId, UnitName = iu.UnitName }).ToList(); return(result); } } catch (Exception) { throw; } }
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; } }
public int GetPlanNo() { using (var _context = new ERPSSL_LCEntities()) { var query = (from c in _context.Prod_Planning select c.ID); var maxId = query.Count(); return(maxId); } }
internal List <LC_Factory> LoadFactoryListByName(string name) { try { using (var _context = new ERPSSL_LCEntities()) { return(_context.LC_Factory.Where(x => x.FactoryName == name).ToList()); } } catch (Exception) { throw; } }
public static List <string> SearchAllOrderNo(string prefixText, int count) { ERPSSL_LCEntities _context = new ERPSSL_LCEntities(); var ONumbers = from ces in _context.LC_CostEstimateSummary where ces.Lc_Order.Contains(prefixText) select ces; List <String> OrderList = new List <String>(); foreach (var OrderN in ONumbers) { OrderList.Add(OrderN.Lc_Order); } return(OrderList); }
public static List <string> SearchAllOrderNoCutting(string prefixText, int count) { ERPSSL_LCEntities _context = new ERPSSL_LCEntities(); var ONumbers = from ces in _context.Prod_Cutting where ces.OrderNo.Contains(prefixText) select ces; List <String> OrderList = new List <String>(); foreach (var OrderN in ONumbers) { OrderList.Add(OrderN.OrderNo); } return(OrderList); }
internal List <Prod_ProductionStatusDetails> GetDailyProductionStatus() { try { using (var _context = new ERPSSL_LCEntities()) { return(_context.Prod_ProductionStatusDetails.ToList()); } } catch (Exception) { throw; } }
internal List <Prod_LineAllocationTemp> GetAllTempByPlanNo(string plan, string OCODE) { try { using (var _context = new ERPSSL_LCEntities()) { return(_context.Prod_LineAllocationTemp.Where(x => x.PlanNo == plan && x.OCode == OCODE).ToList()); } } catch (Exception) { throw; } }
internal List <Com_Buyer_Setup> GetBuyerByName(string name) { try { using (var _context = new ERPSSL_LCEntities()) { return(_context.Com_Buyer_Setup.Where(x => x.Buyer_Name == name).ToList()); } } catch (Exception) { throw; } }
internal List <FinishingDetailsR> GetFinishingDetails(string OCODE) { try { using (var _Context = new ERPSSL_LCEntities()) { List <FinishingDetailsR> result = (from f in _Context.Prod_Finishing join w in _Context.Prod_Washing on f.WashingID equals w.ID join s in _Context.Prod_Sewing on w.SewingID equals s.ID join c in _Context.Prod_Cutting on w.CuttingID equals c.ID join cb in _Context.Com_Buyer_Setup on w.BuyerID equals cb.Buyer_ID join iu in _Context.Inv_Unit on w.TotalWashingReceivedUnit equals iu.UnitId where s.OCode == OCODE select new FinishingDetailsR { ID = f.ID, CuttingID = f.CuttingID, OrderNo = f.OrderNo, OrderQty = f.OrderQty, GoodsName = f.GoodsName, FGoodsQty = f.FGoodsQty, FGoodsUnit = f.FGoodsUnit, SewingID = f.SewingID, BuyerID = f.BuyerID, WashingID = f.WashingID, TotalWashingCompleteDate = f.TotalWashingCompleteDate, TotalWashingCompleteQty = f.TotalWashingCompleteQty, TotalWashingCompleteUnit = f.TotalWashingCompleteUnit, TotalFinishingReceivedDate = f.TotalFinishingReceivedDate, TotalFinishingReceivedQty = f.TotalFinishingReceivedQty, TotalFinishingReceivedUnit = f.TotalFinishingReceivedUnit, TotalFinishingCompleteDate = f.TotalFinishingCompleteDate, TotalFinishingCompleteQty = f.TotalFinishingCompleteQty, TotalFinishingCompleteUnit = f.TotalFinishingCompleteUnit, Buyer_ID = cb.Buyer_ID, BuyerName = cb.Buyer_Name, UnitId = iu.UnitId, UnitName = iu.UnitName }).ToList(); return(result); } } catch (Exception) { throw; } }
internal IEnumerable <ItemList> MeasurementParameter(string Ocode, int finishGoods) { using (var _context = new ERPSSL_LCEntities()) { return((from mp in _context.LC_Measurement_Parameter join fg in _context.LC_FinishGoods on mp.FinishGoods_Id equals fg.FinishGoods_Id where mp.OCode == Ocode && mp.FinishGoods_Id == finishGoods select new ItemList { Measurement_Id = mp.Measurement_Id, FinishGoodsName = fg.FinishGoods_Name, MagermentName = mp.Measurement_Name, }).ToList()); } }
public static List <string> SearchFactoryName(string prefixText, int count) { using (var _context = new ERPSSL_LCEntities()) { var AllFN = from lcN in _context.LC_Factory where ((lcN.FactoryName.Contains(prefixText))) select lcN; List <String> FNList = new List <String>(); foreach (var FNL in AllFN) { FNList.Add(FNL.FactoryName); } return(FNList); } }
public static List <string> SearchOrderNo(string prefixText, int count) { using (var _context = new ERPSSL_LCEntities()) { var AllOrder = from O in _context.LC_OrderEntry where ((O.OrderNo.Contains(prefixText))) select O; List <String> O_List = new List <String>(); foreach (var O_No in AllOrder) { O_List.Add(O_No.OrderNo); } return(O_List); } }
public static List <string> SearchLCNo(string prefixText, int count) { using (var _context = new ERPSSL_LCEntities()) { var AllLC = from lcN in _context.LC_MasterLC where ((lcN.LCNo.Contains(prefixText))) select lcN; List <String> LCList = new List <String>(); foreach (var LC_No in AllLC) { LCList.Add(LC_No.LCNo); } return(LCList); } }
internal List <Rep_MasterLC> GetRPTLCIssue() { try { using (var _context = new ERPSSL_LCEntities()) { string SP_SQL = "HRM_RPT_EmployeeSalaryALLStatusByRODSID"; return((_context.ExecuteStoreQuery <Rep_MasterLC>(SP_SQL)).ToList()); } } catch (Exception) { throw; } }
public static List <string> SearchBuyerName(string prefixText, int count) { using (var _context = new ERPSSL_LCEntities()) { var Q = from lcN in _context.Com_Buyer_Setup where ((lcN.Buyer_Name.Contains(prefixText))) select lcN; List <String> List = new List <String>(); foreach (var BL in Q) { List.Add(BL.Buyer_Name); } return(List); } }
public static List <string> SearchLCNo(string prefixText, int count) { using (var _context = new ERPSSL_LCEntities()) { var AllOrder = from lcN in _context.LC_OrderEntry where lcN.CompShipmentDate == null && ((lcN.OrderNo.Contains(prefixText))) select lcN; List <String> OrderList = new List <String>(); foreach (var Order_No in AllOrder) { OrderList.Add(Order_No.OrderNo); } return(OrderList); } }
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; } }
internal List <HRM_SUB_SECTIONS> GetLine(string OCODE) { try { using (var _context = new ERPSSL_LCEntities()) { var result = _context.HRM_SUB_SECTIONS.Where(x => x.OCODE == OCODE).DistinctBy(x => x.SUB_SEC_NAME).ToList(); return(result); } } catch (Exception) { throw; } }
internal IEnumerable <RFEmployee> GetEmployees(string OCODE) { try { using (var _context = new ERPSSL_LCEntities()) { var ParamempID = new SqlParameter("@OCODE", OCODE); string SP_SQL = "HRM_EmployesList @OCODE"; return((_context.ExecuteStoreQuery <RFEmployee>(SP_SQL, ParamempID)).ToList()); } } catch (Exception) { throw; } }
internal List <BuyingHouseReport> GetCompleteShipmentReport(string OCode) { try { using (var _context = new ERPSSL_LCEntities()) { var _OCode = new SqlParameter("@OCODE", OCode); string SP_SQL = "LC_RPT_GetCompleteShipmentReport @OCODE"; return((_context.ExecuteStoreQuery <BuyingHouseReport>(SP_SQL, _OCode)).ToList()); } } catch (Exception ex) { throw ex; } }
internal List <ReportLC> GetLCOrderDetailsReport(string OCode) { try { using (var _context = new ERPSSL_LCEntities()) { var _OCode = new SqlParameter("@OCODE", OCode); string SP_SQL = "LC_RPT_Get_ALL_OrderDetails @OCODE"; return((_context.ExecuteStoreQuery <ReportLC>(SP_SQL, _OCode)).ToList()); } } catch (Exception ex) { throw ex; } }
internal List <ItemList> GetMagermentParameterList(string Ocode) { using (var _context = new ERPSSL_LCEntities()) { return((from mp in _context.LC_Measurement_Parameter join fg in _context.LC_FinishGoods on mp.FinishGoods_Id equals fg.FinishGoods_Id select new ItemList { Measurement_Id = mp.Measurement_Id, FinishGoodsName = fg.FinishGoods_Name, MagermentName = mp.Measurement_Name, }).ToList()); } }
internal ItemList GetBuyerDetails() { try { using (var _context = new ERPSSL_LCEntities()) { string SP_SQL = "[BH_ExestingBuyer]"; return((_context.ExecuteStoreQuery <ItemList>(SP_SQL)).FirstOrDefault()); } } catch (Exception) { throw; } }
internal Year GetServiceScheduleMonthWise() { try { using (var _context = new ERPSSL_LCEntities()) { string SP_SQL = "[OrderRatioMonthWise]"; return((_context.ExecuteStoreQuery <Year>(SP_SQL)).FirstOrDefault()); } } catch (Exception) { throw; } }
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()); } }
internal LC_InputType GetInputByID(int inputID) { try { using (var context = new ERPSSL_LCEntities()) { return((from i in context.LC_InputType where i.InputType_Id == inputID select i).FirstOrDefault()); } } catch (Exception) { throw; } }
internal int AddLineAllocation(Prod_LineAllocationTemp _LineAllocationTemp) { try { using (var _context = new ERPSSL_LCEntities()) { _context.AddToProd_LineAllocationTemp(_LineAllocationTemp); _context.SaveChanges(); return(1); } } catch (Exception) { throw; } }