Пример #1
0
        public ActionResult GetQuickStockReport()
        {
            PLog.Info("BEGIN::Controller > GridStock, Method >GetStockReport()");
            StockReportImple objModel = new StockReportImple();

            try
            {
                objModel.GetStockReportData();
                objModel.GenerateReportData();
            }
            catch (Exception ex)
            {
                PLog.Error("Error::Controller >GridStock, Method > GetStockReport()", ex);
            }
            PLog.Info("END::Controller > GridStock, Method > GetStockReport()");
            return(View(objModel));
        }
Пример #2
0
        public ActionResult GetReOrdQtyHistory(string ProductID, string WarehouseID, string Type)
        {
            PLog.Info("BEGIN::Controller > GridStock, Method > GetReOrdQtyHistory(string ProductID, string WarehouseID)");
            string str = "{}";

            try
            {
                if (!string.IsNullOrEmpty(ProductID) && !string.IsNullOrEmpty(WarehouseID))
                {
                    StockReportImple objModel = new StockReportImple();
                    if (Type.ToLower() == "inward")
                    {
                        DataSet ds = objModel.GetReOrdQtyHistory(Convert.ToInt32(ProductID), Convert.ToInt32(WarehouseID));

                        if (ds != null && ds.Tables.Count > 0)
                        {
                            str = JsonConvert.SerializeObject(ds.Tables[0]);
                        }
                    }
                    else if (Type.ToLower() == "outward")
                    {
                        DataSet ds = objModel.GetBlockedQtyHistory(Convert.ToInt32(ProductID), Convert.ToInt32(WarehouseID));

                        if (ds != null && ds.Tables.Count > 0)
                        {
                            str = JsonConvert.SerializeObject(ds.Tables[0]);
                        }
                    }
                }
            }
            catch (Exception ex)
            {
                PLog.Error("Error::Controller >GridStock, Method > GetReOrdQtyHistory(string ProductID, string WarehouseID)", ex);
            }
            PLog.Info("END::Controller > GridStock, Method > GetReOrdQtyHistory(string ProductID, string WarehouseID)");
            return(Json(str, JsonRequestBehavior.AllowGet));
        }