Пример #1
0
        // Approve or unapprove sales order(approved or unapproved status)
        public string ChangeOrderStatus(FormCollection coll)
        {
            string  result    = string.Empty;
            BAL_OTC objBALOTC = new BAL_OTC();

            result = objBALOTC.ChangeOrderStatus(_objcurrentInfo.GetCompanyCode(), Convert.ToChar(coll["status"]), coll["orderIds"].ToString(), _objcurrentInfo.GetUserCode(), coll["approvalRemarks"].ToString());
            return(result);
        }
Пример #2
0
        public JsonResult GetSalesOrderStatus(FormCollection coll)
        {
            List <MVCModels.HiDoctor_Master.SalesOrderStatusModel> lstCust = new List <MVCModels.HiDoctor_Master.SalesOrderStatusModel>();
            IOTC   icustDetail = new BAL_OTC();
            string regionCode  = string.Empty;

            lstCust = icustDetail.GetSalesOrderStatus(_objcurrentInfo.GetCompanyCode(), _objcurrentInfo.GetRegionCode());
            return(Json(lstCust, JsonRequestBehavior.AllowGet));
        }
Пример #3
0
        public JsonResult GetOrderStatusView(FormCollection coll)
        {
            DataSet ds          = new DataSet();
            IOTC    icustDetail = new BAL_OTC();

            ds = icustDetail.GetOrderDetails(_objcurrentInfo.GetCompanyCode(), coll["orderId"].ToString(), coll["mode"].ToString());
            JSONConverter json = new JSONConverter();

            return(Json(json.Serialize(ds), JsonRequestBehavior.AllowGet));
        }
Пример #4
0
        public JsonResult GetSchemeDetails(FormCollection coll)
        {
            List <MVCModels.HiDoctor_Activity.OTCModel> lstScheme = new List <MVCModels.HiDoctor_Activity.OTCModel>();
            IOTC   ischeme    = new BAL_OTC();
            string regionCode = string.Empty;

            regionCode = (coll["regionCode"].ToString() == IsSession) ? _objcurrentInfo.GetRegionCode() : coll["regionCode"].ToString();
            lstScheme  = ischeme.GetSchemeDetails(_objcurrentInfo.GetCompanyCode(), regionCode, coll["productCodes"].ToString(), coll["orderDate"].ToString());
            return(Json(lstScheme, JsonRequestBehavior.AllowGet));
        }
Пример #5
0
        // customer total order detail for a month
        public JsonResult GetCustomerOrders(FormCollection coll)
        {
            List <MVCModels.HiDoctor_Activity.OTCModel> lstCustOrder = new List <MVCModels.HiDoctor_Activity.OTCModel>();
            IOTC   icustDetail = new BAL_OTC();
            string regionCode  = string.Empty;

            regionCode   = (coll["regionCode"].ToString() == IsSession) ? _objcurrentInfo.GetRegionCode() : coll["regionCode"].ToString();
            lstCustOrder = icustDetail.GetCustomerOrders(_objcurrentInfo.GetCompanyCode(), regionCode, coll["customerCode"].ToString(), Convert.ToInt32(coll["month"]), Convert.ToInt32(coll["year"]));
            return(Json(lstCustOrder, JsonRequestBehavior.AllowGet));
        }
Пример #6
0
        // Product Details
        public JsonResult GetProductDetails(FormCollection coll)
        {
            List <MVCModels.HiDoctor_Activity.OTCModel> lstProduct = new List <MVCModels.HiDoctor_Activity.OTCModel>();
            IOTC   icustDetail = new BAL_OTC();
            string regionCode  = string.Empty;

            regionCode = (coll["regionCode"].ToString() == IsSession) ? _objcurrentInfo.GetRegionCode() : coll["regionCode"].ToString();
            lstProduct = icustDetail.GetProductDetails(_objcurrentInfo.GetCompanyCode(), coll["match"].ToString(), regionCode, coll["columnName"].ToString());
            return(Json(lstProduct, JsonRequestBehavior.AllowGet));
        }
Пример #7
0
        public JsonResult GetSalesOrderLoadDetails(FormCollection coll)
        {
            DataSet ds        = new DataSet();
            BAL_OTC objBALOTC = new BAL_OTC();

            ds = objBALOTC.GetSalesOrderLoadDetails(_objcurrentInfo.GetCompanyCode(), _objcurrentInfo.GetRegionCode());

            JSONConverter json = new JSONConverter();

            return(Json(json.Serialize(ds), JsonRequestBehavior.AllowGet));
        }
Пример #8
0
        // Inert or update Sales order(applied or drafted status)
        public string InsertOTC(string orderId, string orderDate, string isSubmit, string productString, string custCode, string salesPersonCode
                                , string salesPersonName, string orderValue, string remarks, string refNumber, string productCodes, string offerCodes, string dueDate)
        {
            BAL_OTC objBALOTC = new BAL_OTC();

            salesPersonCode = (salesPersonCode == IsSession) ? _objcurrentInfo.GetRegionCode() : salesPersonCode;
            string enterBy       = _objcurrentInfo.GetUserCode();
            string enterByRegion = _objcurrentInfo.GetRegionCode();

            salesPersonName = (salesPersonName == "") ? _objcurrentInfo.GetUserName() : salesPersonName.Split('(')[0];
            return(objBALOTC.InsertOTC(_objcurrentInfo.GetCompanyCode(), orderId, orderDate, isSubmit, productString, custCode, salesPersonCode, salesPersonName, enterBy, enterByRegion, orderValue, remarks, refNumber, productCodes, offerCodes, dueDate));
        }
Пример #9
0
        public JsonResult GetApproveOrderlist(FormCollection coll)
        {
            DataSet ds          = new DataSet();
            IOTC    icustDetail = new BAL_OTC();
            string  userCode    = string.Empty;

            userCode = (coll["mode"].ToString() == "ALL") ? _objcurrentInfo.GetUserCode() : coll["userCode"].ToString();
            ds       = icustDetail.GetApproveOrder(_objcurrentInfo.GetCompanyCode(), userCode, coll["mode"].ToString());
            JSONConverter json = new JSONConverter();

            return(Json(json.Serialize(ds), JsonRequestBehavior.AllowGet));
        }
Пример #10
0
        // customer detail based on the entity
        public JsonResult GetCustomerDetails(FormCollection coll)
        {
            List <MVCModels.HiDoctor_Master.CustomerModel> lstCust = new List <MVCModels.HiDoctor_Master.CustomerModel>();
            IOTC   icustDetail = new BAL_OTC();
            string regionCode  = string.Empty;

            if (coll["customerEntity"].ToString().ToUpper() == customerEntity) //  if cust entity is equals to ALL, it returns all the customer detail for the reion code.
            {
                string mode = coll["mode"].ToString();
                lstCust = icustDetail.GetCustomerDetails(_objcurrentInfo.GetCompanyCode(), _objcurrentInfo.GetRegionCode(), mode);
            }
            else
            {
                regionCode = (coll["regionCode"].ToString() == IsSession) ? _objcurrentInfo.GetRegionCode() : coll["regionCode"].ToString();
                lstCust    = icustDetail.GetCustomerDetails(_objcurrentInfo.GetCompanyCode(), coll["match"].ToString(), regionCode, coll["customerEntity"].ToString());
            }

            return(Json(lstCust, JsonRequestBehavior.AllowGet));
        }