Пример #1
0
        internal List <productsDetails> GetAllProductWithProgram(string productId, int program, string StoreCode)
        {
            try
            {
                string programid = Convert.ToString(program);

                var programId = new SqlParameter("ProgramId", programid);
                var barcode   = new SqlParameter("BarCode", productId);
                var storeCode = new SqlParameter("StoreCode", StoreCode);

                string SP_SQL = "Inv_GetAllProduct_ProgramToCentral_Return @ProgramId,@BarCode,@StoreCode";
                return((_context.ExecuteStoreQuery <productsDetails>(SP_SQL, programId, barcode, storeCode)).ToList());



                //int pId = Convert.ToInt32(productId);
                //var buy = (from buys in _context.Inv_IChallan
                //           join r in _context.Inv_Return on  buys.ChallanNo_From  equals  r.ChallanNo_To
                //                          into a
                //           from r in a.DefaultIfEmpty()
                //           where buys.ProductId == pId && buys.Program == program && buys.Store_Code == StoreCode

                //           select new productsDetails
                //           {

                //               ChallanNo = buys.ChallanNo,
                //               BarCode = buys.BarCode,
                //               ProductName = buys.ProductName,
                //               Brand = buys.Brand,
                //               StyleSize = buys.StyleSize,
                //               BalanceQuanity = (buys.BalanceQuanity == null ? 0 : buys.BalanceQuanity) - (r.ERetQty == null ? 0 : r.ERetQty),
                //               SupplierReturnQty = buys.SupplierReturnQty,
                //               productGroup = buys.ProductGroup,
                //               ReceiveQuantity = buys.ReceiveQuantity,
                //               CPU = buys.CPU,
                //               DeliveryQty = buys.DeliveryQty,
                //               Ocode = buys.OCode,
                //               PurchaseDate = buys.PurchaseDate,
                //               UnitName = buys.UnitName
                //           }

                //);
                //return buy.ToList();
            }
            catch (Exception)
            {
                throw;
            }
        }
Пример #2
0
        internal IEnumerable <RDepartmentType> GetDepartmentType(string OCODE)
        {
            using (var _context = new ERPSSL_INVEntities())
            {
                var ParamempID = new SqlParameter("@OCODE", OCODE);

                string SP_SQL = "Inv_GetDepartmentType @OCODE";

                return((_context.ExecuteStoreQuery <RDepartmentType>(SP_SQL, ParamempID)).ToList());
            }
        }
Пример #3
0
 public List <Inv_Product> GetProductListByGroup(int GroupId)
 {
     try
     {
         var    GroupID = new SqlParameter("GroupId", GroupId);
         string SP_SQL  = "INV_GETPRODUCTBYGROUP @GroupId";
         return((_context.ExecuteStoreQuery <Inv_Product>(SP_SQL, GroupID)).ToList());
     }
     catch (Exception ex)
     {
         throw new Exception(ex.Message.ToString());
     }
 }
Пример #4
0
 internal List <productsDetails> Rpt_GetAllProducts()
 {
     try
     {
         using (var _context = new ERPSSL_INVEntities())
         {
             string SP_SQL = "INV_ProductReports_RPT ";
             return((_context.ExecuteStoreQuery <productsDetails>(SP_SQL)).ToList());
         }
     }
     catch (Exception ex)
     {
         throw new Exception(ex.Message.ToString());
     }
 }
Пример #5
0
 public List <productsDetails> Rpt_GetStockBy_ReOrderQty()
 {
     try
     {
         using (var _context = new ERPSSL_INVEntities())
         {
             string SP_SQL = "INV_FullStockReportsBy_ReOrderQty_RPT";
             return((_context.ExecuteStoreQuery <productsDetails>(SP_SQL)).ToList());
         }
     }
     catch (Exception ex)
     {
         throw new Exception(ex.Message.ToString());
     }
 }
Пример #6
0
 internal List <GINStoreReqR> GetAll_DistinctApprovedStoreReq()
 {
     try
     {
         using (var _context = new ERPSSL_INVEntities())
         {
             string SP_SQL = "PRQ_GetAll_DistinctApprovedStoreReq";
             return((_context.ExecuteStoreQuery <GINStoreReqR>(SP_SQL)).ToList());
         }
     }
     catch (Exception ex)
     {
         throw new Exception(ex.Message.ToString());
     }
 }
Пример #7
0
 public List <SuplierDetails> Rpt_GetAllSupplier()
 {
     try
     {
         using (var _context = new ERPSSL_INVEntities())
         {
             string SP_SQL = "INV_SuplierReports_RPT ";
             return((_context.ExecuteStoreQuery <SuplierDetails>(SP_SQL)).ToList());
         }
     }
     catch (Exception ex)
     {
         throw new Exception(ex.Message.ToString());
     }
 }
Пример #8
0
 internal List <ProductLog> Rpt_GetAllProduct(string OCODE)
 {
     try
     {
         using (var _context = new ERPSSL_INVEntities())
         {
             var    ocode  = new SqlParameter("@OCODE", OCODE);
             string SP_SQL = "INV_Product_Update_Log @OCODE";
             return((_context.ExecuteStoreQuery <ProductLog>(SP_SQL, ocode)).ToList());
         }
     }
     catch (Exception)
     {
         throw;
     }
 }
Пример #9
0
 public List <productsDetails> Rpt_GetStockBy_Store(string StoreCode)
 {
     try
     {
         using (var _context = new ERPSSL_INVEntities())
         {
             var    store  = new SqlParameter("@StoreCode", StoreCode);
             string SP_SQL = "INV_FullStockReportsBy_Store_RPT @StoreCode";
             return((_context.ExecuteStoreQuery <productsDetails>(SP_SQL, store)).ToList());
         }
     }
     catch (Exception ex)
     {
         throw new Exception(ex.Message.ToString());
     }
 }
Пример #10
0
 internal List <PRQ_PurchaseOrders> GetAllPurchaseOrderByPONo(string PONo)
 {
     try
     {
         using (var _context = new ERPSSL_INVEntities())
         {
             var    PONO   = new SqlParameter("@PONo", PONo);
             string SP_SQL = "PRQ_GetWorkOrdersToRcvProduct_ByPONo @PONo";
             return((_context.ExecuteStoreQuery <PRQ_PurchaseOrders>(SP_SQL, PONO)).ToList());
         }
     }
     catch (Exception)
     {
         throw;
     }
 }
Пример #11
0
 internal List <PRQ_PurchaseOrders> GetAllPurchaseOrder(string PurchaseType)
 {
     try
     {
         using (var _context = new ERPSSL_INVEntities())
         {
             var    type   = new SqlParameter("@PurchaseType", PurchaseType);
             string SP_SQL = "PRQ_GetDistinctWorkOrdersToRcvProduct @PurchaseType";
             return((_context.ExecuteStoreQuery <PRQ_PurchaseOrders>(SP_SQL, type)).ToList());
         }
     }
     catch (Exception)
     {
         throw;
     }
 }
Пример #12
0
 internal List <productsDetails> GetAllProductByGroupId(int groupID, string OCODE)
 {
     try
     {
         using (var _context = new ERPSSL_INVEntities())
         {
             var    groupid = new SqlParameter("@GroupID", groupID);
             var    oCode   = new SqlParameter("@OCODE", OCODE);
             string SP_SQL  = "INV_RPT_ProductListByGroupID @GroupID,@OCODE";
             return((_context.ExecuteStoreQuery <productsDetails>(SP_SQL, groupid, oCode)).ToList());
         }
     }
     catch (Exception ex)
     {
         throw new Exception(ex.Message.ToString());
     }
 }
Пример #13
0
 internal List <DeleveryProductR> PRQ_GetSelectedProductToDeliverByReqNo(string reqno, string Ocode)
 {
     try
     {
         using (var _context = new ERPSSL_INVEntities())
         {
             var    ocode           = new SqlParameter("@OCODE", Ocode);
             var    ParamsalRequsNo = new SqlParameter("@Req", reqno);
             string SP_SQL          = "PRQ_GetSelectedProductToDeliverByReqNo @OCODE,@Req";
             return((_context.ExecuteStoreQuery <DeleveryProductR>(SP_SQL, ocode, ParamsalRequsNo)).ToList());
         }
     }
     catch (Exception ex)
     {
         throw new Exception(ex.Message.ToString());
     }
 }
Пример #14
0
 internal List <productsDetails> GetAllGroupProductByEID(string EID, string OCODE)
 {
     try
     {
         using (var _context = new ERPSSL_INVEntities())
         {
             var    eid    = new SqlParameter("@EID", EID);
             var    ocode  = new SqlParameter("@OCODE", OCODE);
             string SP_SQL = "Inv_GetAllUserwiseCategory_Product @EID,@OCODE";
             return((_context.ExecuteStoreQuery <productsDetails>(SP_SQL, eid, ocode)).ToList());
         }
     }
     catch (Exception)
     {
         throw;
     }
 }
Пример #15
0
 public List <productsDetails> Rpt_GetStockBy_Store_Product(string StoreCode, string productGroupId, string ProductId)
 {
     try
     {
         using (var _context = new ERPSSL_INVEntities())
         {
             var    store   = new SqlParameter("@StoreCode", StoreCode);
             var    group   = new SqlParameter("@ProductGroupId", productGroupId);
             var    product = new SqlParameter("@ProductId", ProductId);
             string SP_SQL  = "INV_FullStockReportsBy_Store_Product_RPT @StoreCode,@ProductGroupId,@ProductId";
             return((_context.ExecuteStoreQuery <productsDetails>(SP_SQL, store, group, product)).ToList());
         }
     }
     catch (Exception ex)
     {
         throw new Exception(ex.Message.ToString());
     }
 }
Пример #16
0
 internal IEnumerable <RReturn> GetReturnFromSupplier_ByDate(string OCODE, DateTime Fromdate, DateTime Todate)
 {
     try
     {
         using (var _context = new ERPSSL_INVEntities())
         {
             var    ParamempID1 = new SqlParameter("@OCODE", OCODE);
             var    ParamempID2 = new SqlParameter("@FROMDATE", Fromdate);
             var    ParamempID3 = new SqlParameter("@TODATE", Todate);
             string SP_SQL      = "Inv_Rpt_ReturnFromSupplier_ByDate @OCODE,@FROMDATE,@TODATE";
             return((_context.ExecuteStoreQuery <RReturn>(SP_SQL, ParamempID1, ParamempID2, ParamempID3)).ToList());
         }
     }
     catch (Exception)
     {
         throw;
     }
 }
Пример #17
0
 public List <productsDetails> Rpt_GetFullStockDetailsByDate(string FromDate, string ToDate, string OCODE)
 {
     try
     {
         using (var _context = new ERPSSL_INVEntities())
         {
             var    DateForm = new SqlParameter("@FromDate", FromDate);
             var    DateTo   = new SqlParameter("@ToDate", ToDate);
             var    OCode    = new SqlParameter("@OCODE", OCODE);
             string SP_SQL   = "Inv_Rpt_StockDetails_ByDate @FromDate,@ToDate,@OCODE ";
             return((_context.ExecuteStoreQuery <productsDetails>(SP_SQL, DateForm, DateTo, OCode)).ToList());
         }
     }
     catch (Exception ex)
     {
         throw new Exception(ex.Message.ToString());
     }
 }
Пример #18
0
 public List <productsDetails> Rpt_GetFullStockDetailsByDate_Product_WithStore(string FromDate, string ToDate, string OCODE, string GroupId, string ProductId, string storeCode)
 {
     try
     {
         using (var _context = new ERPSSL_INVEntities())
         {
             var    DateForm  = new SqlParameter("@FromDate", FromDate);
             var    DateTo    = new SqlParameter("@ToDate", ToDate);
             var    OCode     = new SqlParameter("@OCODE", OCODE);
             var    groupId   = new SqlParameter("@GroupId", GroupId);
             var    productId = new SqlParameter("@ProductId", ProductId);
             var    Store     = new SqlParameter("@StoreCode", storeCode);
             string SP_SQL    = "Inv_Rpt_StockDetails_ByDate_Product_WithStore @FromDate,@ToDate,@OCODE,@GroupId,@ProductId,@StoreCode ";
             return((_context.ExecuteStoreQuery <productsDetails>(SP_SQL, DateForm, DateTo, OCode, groupId, productId, Store)).ToList());
         }
     }
     catch (Exception ex)
     {
         throw new Exception(ex.Message.ToString());
     }
 }