public void DemandOrderCreate(DemandCreateModel obj) { int flag = 0; Dictionary <string, int> returndata = new Dictionary <string, int>(); returndata.Add("status", 0); if (obj.apiKey == ConfigurationManager.AppSettings["reasonkey"]) { try { flag = _agentbal.DemandOrderCreate(obj); //if (flag > 0) //{ // flag = 1; //} //else //{ flag = 0; } returndata.Remove("status"); returndata.Add("status", flag); } catch (Exception ex) { returndata.Remove("status"); returndata.Add(ex.Message, 0); LogBal.ErrorLog(this.GetType().Name, MethodBase.GetCurrentMethod().Name, ex.Message, 0); } } string json = JsonConvert.SerializeObject(returndata); HttpContext.Current.Response.ContentType = "application/json; charset=utf-8"; HttpContext.Current.Response.Write(json); }
public int DemandOrderCreate(DemandCreateModel obj) { int flag = _Apdal.DemandOrderCreate(obj.FarmerName, obj.Mobile, obj.CropID, obj.CategoryID, obj.PackageID, obj.FarmerPrice, obj.Product, obj.AadharOrLoanNo, obj.DistrictId, obj.UserId, obj.Qty); return(flag); }