public JsonResult For_Complete_pick([FromBody] complete_pickno complete) // close this pick by this api { Main objmain = new Main(); string result = objmain.Pick_Completed_Try(complete); DataSet ds = new DataSet(); ds = objmain.Get_Pick_Detail(Convert.ToInt32(complete.location), complete.email); DataColumn pending_pick = new DataColumn(); pending_pick.ColumnName = "pending_pick"; pending_pick.DefaultValue = ds.Tables[1].Rows[0][0].ToString(); ds.Tables[0].Columns.Add(pending_pick); XmlDocument xmltest = new XmlDocument(); xmltest.LoadXml(result); XmlNodeList error = xmltest.GetElementsByTagName("faultstring"); if (error.Count > 0) { return(objmain.Add_Condition(ds.Tables[0], "Error", error[0].InnerXml)); } XmlNodeList success = xmltest.GetElementsByTagName("return_value"); if (success.Count > 0) { int resultcomplete = objmain.Pick_Increase_Qty_Procedure(complete, "Complete"); if (resultcomplete > 0) { DataTable dt = new DataTable(); dt.Columns.Add("condition", typeof(System.String)); dt.Columns.Add("Message", typeof(System.String)); dt.Rows.Add(); dt.Rows[0]["condition"] = "True"; dt.Rows[0]["Message"] = "Your Pick is Done"; return(objmain.DataTableToJsonWithJsonNet(dt)); } return(objmain.Add_Condition(ds.Tables[0], "Error", "Pick Not Completed Due To Some DataBase Problem")); } return(new JsonResult("API bust")); }
public JsonResult Pick_Info([FromBody] complete_pickno info_rec) { Main objmain = new Main(); return(objmain.specific_pickDetails(info_rec.pickno)); }