public static Dictionary <string, object> BindMonthlyPurchase(string CorpID, string FacilityID, string VendorID, string CategoryID, Nullable <DateTime> Month, Nullable <DateTime> DateFrom, Nullable <DateTime> DateTo, string ItemID, string ortype) { try { InventoryServiceClient lclsservice = new InventoryServiceClient(); Page_Controls defaultPage = new Page_Controls(); BALReport llstReport = new BALReport(); string Status = string.Empty; llstReport.CorporateID = CorpID; llstReport.FacilityID = FacilityID; llstReport.VendorID = VendorID; llstReport.ItemCategoryID = CategoryID; if (Convert.ToString(Month) != "") { llstReport.DateFrom = Month; } else { llstReport.DateFrom = DateFrom; } llstReport.DateTo = DateTo; if (ItemID != "") { llstReport.ItemID = ItemID; } if (ortype != "0") { llstReport.OrderType = ortype; } llstReport.LoggedInBy = Roleid; llstReport.Filter = ""; DataSet ds = new DataSet(); ds = lclsservice.GetMonthlyPurchaseReport(llstReport); DataTable dtColumns = new DataTable(); dtColumns.Columns.Add("title"); dtColumns.Columns.Add("data"); DataRow drr = null; foreach (DataColumn dr in ds.Tables[0].Columns) { dtColumns.NewRow(); dtColumns.Rows.Add(dr.ToString(), dr.ToString()); } Dictionary <string, object> list = new Dictionary <string, object>(); list["List01"] = GetDataTableDictionaryList(ds.Tables[0]); list["List02"] = GetDataTableDictionaryList(dtColumns); return(list); } catch (Exception ex) { throw; } }