Example #1
0
        public JsonResult StockiestDetails(FormCollection collection)
        {
            string accom_Regioncodes = string.Empty;
            string accom_EntityType  = string.Empty;

            try
            {
                string dcrStatus = collection["dcrStatus"].ToString();
                string dcrDate   = collection["dcrDate"].ToString();
                string dcrCode   = _objCurr.GetDCRCode(dcrDate);
                //Adding Accompanist's Stockiest Details
                accom_Regioncodes = collection["acc_Regions"].ToString();
                accom_EntityType  = collection["showAccDataValue"].ToString();

                List <DCRStockiestModel> lstStockiestAuto    = new List <DCRStockiestModel>();
                List <DCRStockiestModel> lstDraftedStockiest = new List <DCRStockiestModel>();

                lstStockiestAuto = _objDCRBL.GetAccompaistStockist(_objCurr.GetCompanyCode(), _objCurr.GetRegionCode(), accom_Regioncodes, accom_EntityType);
                //lstStockiestAuto = _objDCRBL.GetStockist(_objCurr.GetCompanyCode(), _objCurr.GetRegionCode());

                if (dcrStatus == "3" || dcrStatus == "0")
                {
                    lstDraftedStockiest = _objDCRBL.GetDraftedStockist(_objCurr.GetCompanyCode(), _objCurr.GetUserCode(), dcrCode, dcrDate);
                }

                List <JsonResult> lstStockiest = new List <JsonResult> {
                    Json(lstStockiestAuto, JsonRequestBehavior.AllowGet), Json(lstDraftedStockiest, JsonRequestBehavior.AllowGet)
                };
                return(Json(lstStockiest, JsonRequestBehavior.AllowGet));
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
Example #2
0
        public JsonResult GetStockist(string accom_Regioncodes)
        {
            var lstStockiestAuto = new List <DCRStockiestModel>();

            try
            {
                var _objDCRStockiestExpense = new BL_DCRStockiestExpense();
                var _objDCRBL = new BL_DCRStockiestExpense();
                lstStockiestAuto = _objDCRBL.GetAccompaistStockist(_objCurrentInfo.GetCompanyCode(), accom_Regioncodes, accom_Regioncodes, "");
            }
            catch (Exception ex)
            {
            }
            return(Json(lstStockiestAuto));
        }