public CreatedOrderResult OrderCreateV2(OrderCreateModel obj)
        {
            ReasonStatusBal    _rsbal             = new ReasonStatusBal();
            CreatedOrderResult objCreateOrderData = new CreatedOrderResult();
            int flag = 0;
            Dictionary <string, int> returndata = new Dictionary <string, int>();

            returndata.Add("status", 0);

            try
            {
                System.Net.Http.Headers.HttpRequestHeaders headers = this.Request.Headers;
                string x_StateName    = string.Empty;
                string x_DistrictName = string.Empty;
                if (headers.Contains("state"))
                {
                    x_StateName = headers.GetValues("state").First().ToLower();
                }
                if (headers.Contains("district"))
                {
                    x_DistrictName = headers.GetValues("district").First().ToLower();
                }
                objCreateOrderData = _rsbal.OrderCreateV2(obj, x_StateName, x_DistrictName);
            }
            catch (Exception ex)
            {
                LogDal.ErrorLog(this.GetType().Name, MethodBase.GetCurrentMethod().Name, ex.Message, obj.userid);
            }

            // string json = JsonConvert.SerializeObject(returndata);
            //HttpContext.Current.Response.ContentType = "application/json; charset=utf-8";
            //HttpContext.Current.Response.Write(json);
            return(objCreateOrderData);
        }
Exemplo n.º 2
0
        public IHttpActionResult GetKGPCategorySubCategoryWiseDataV2(KitchenGardenEntity objkgpList)
        {
            try
            {
                System.Net.Http.Headers.HttpRequestHeaders headers = this.Request.Headers;
                string x_StateName    = string.Empty;
                string x_DistrictName = string.Empty;
                if (headers.Contains("state"))
                {
                    x_StateName = headers.GetValues("state").First().ToLower();
                }
                if (headers.Contains("district"))
                {
                    x_DistrictName = headers.GetValues("district").First().ToLower();
                }

                ReasonStatusBal _rsbal = new ReasonStatusBal();
                // DataSet ds1 = new DataSet();
                var ds1 = _rsbal.GetKGPCategorySubCategoryWiseData(objkgpList, x_StateName, x_DistrictName);
                ds1.Tables[0].TableName = "Product";
                ds1.Tables[1].TableName = "Count";
                return(Ok(new { ProductsApiReponse = ds1, Status = true }));
            }
            catch (Exception ex)
            {
                LogDal.ErrorLog(this.GetType().Name, MethodBase.GetCurrentMethod().Name, ex.Message, 0);
                return(Ok(new { ProductsApiReponse = "", Status = false }));
            }
        }
        public SavedProductResult SaveSubDealerProducts(SubDealerProductCreate obj)
        {
            ReasonStatusBal    _rsbal       = new ReasonStatusBal();
            SavedProductResult objSavedData = new SavedProductResult();
            int flag = 0;
            Dictionary <string, int> returndata = new Dictionary <string, int>();

            returndata.Add("status", 0);

            try
            {
                objSavedData = _rsbal.SaveSubDealerProducts(obj);
            }
            catch (Exception ex)
            {
                LogDal.ErrorLog(this.GetType().Name, MethodBase.GetCurrentMethod().Name, ex.Message, obj.StockId);
            }

            return(objSavedData);
        }
        public ApiPostResponse SaveTractorUsersDetailV2(TractorUsers obj)
        {
            ReasonStatusBal          _rsbal       = new ReasonStatusBal();
            ApiPostResponse          objSavedData = new ApiPostResponse();
            int                      flag         = 0;
            Dictionary <string, int> returndata   = new Dictionary <string, int>();

            returndata.Add("status", 0);

            try
            {
                objSavedData = _rsbal.SaveTractorUserDetailV2(obj);
            }
            catch (Exception ex)
            {
                LogDal.ErrorLog(this.GetType().Name, MethodBase.GetCurrentMethod().Name, ex.Message, 0);
            }

            return(objSavedData);
        }
Exemplo n.º 5
0
 static void Main(string[] args)
 {
     ReasonStatusBal _bal = new ReasonStatusBal();
     int             flag = _bal.FO_CashPendingLeaveMark();
 }
Exemplo n.º 6
0
 static void Main(string[] args)
 {
     ReasonStatusBal _bal = new ReasonStatusBal();
     int             flag = _bal.FoNotUpdateApp();
 }