Пример #1
0
        public JsonResult GetAllActiveProducts()
        {
            DataControl.BLProduct   _objProduct = new DataControl.BLProduct();
            DataControl.CurrentInfo _objCurInfo = new DataControl.CurrentInfo();
            List <MVCModels.HiDoctor_Master.ProductModel> lstProduct = new List <MVCModels.HiDoctor_Master.ProductModel>();

            lstProduct = _objProduct.GetAllActiveProducts(_objCurInfo.GetCompanyCode());
            DataControl.JSONConverter _objJson = new DataControl.JSONConverter();
            return(Json(_objJson.Serialize(lstProduct)));
        }
Пример #2
0
 public ActionResult ProductExcelUploadResult(HttpPostedFileBase file)
 {
     try
     {
         string result = string.Empty;
         DataControl.BLProduct   _objBlProduct = new DataControl.BLProduct();
         DataControl.CurrentInfo _objCurInfo   = new DataControl.CurrentInfo();
         result = _objBlProduct.ProductBulkInsert(_objCurInfo.GetCompanyCode(), Guid.NewGuid().ToString(), file, _objCurInfo.GetUserCode(),
                                                  _objCurInfo.GetSubDomain());
         ViewBag.ErrorCode = result;
         return(View("ProductExcelUploadResult"));
     }
     catch (Exception ex)
     {
         Dictionary <string, string> dicObj = new Dictionary <string, string>();
         DataControl.Impl.ExceptionHandler.WriteLog(ex: ex, dic: dicObj);
         ViewBag.ErrorCode = ex.Message;
         return(View("ProductExcelUploadResult"));
     }
 }
Пример #3
0
 public ActionResult PrimarySalesExcelUploadResult(HttpPostedFileBase file, FormCollection collection)
 {
     try
     {
         const string            TransType       = "hdnTransType";
         string                  transactionType = Convert.ToString(collection[TransType]);
         string                  result          = string.Empty;
         DataControl.BLProduct   _objBlProduct   = new DataControl.BLProduct();
         DataControl.CurrentInfo _objCurInfo     = new DataControl.CurrentInfo();
         result = _objBlProduct.PrimarySalesBulkInsert(_objCurInfo.GetCompanyCode(),
                                                       Guid.NewGuid().ToString(), file, _objCurInfo.GetUserCode(),
                                                       _objCurInfo.GetSubDomain(), transactionType);
         ViewBag.ErrorCode = result;
         return(View("PrimarySalesExcelUploadResult"));
     }
     catch (Exception ex)
     {
         Dictionary <string, string> dicObj = new Dictionary <string, string>();
         DataControl.Impl.ExceptionHandler.WriteLog(ex: ex, dic: dicObj);
         ViewBag.ErrorCode = string.Empty;
         return(View("PrimarySalesExcelUploadResult"));
     }
 }