public JArray SearchAccountStatementDetails([FromBody] AccountStatementSearch data) { Dictionary <string, object> commandParams = new Dictionary <string, object>(); commandParams.Add("@p_SortColumn", data.SortColumn); commandParams.Add("@p_SortOrder", data.SortOrder); commandParams.Add("@p_PageSize", data.PageSize); commandParams.Add("@p_PageStart", data.PageStart); if (data.AccountID.HasValue) { commandParams.Add("@p_AccountID", data.AccountID.Value); } if (data.AdministratorID.HasValue) { commandParams.Add("@p_AdministratorID", data.AdministratorID.Value); } commandParams.Add("@p_AccountStatementType", data.AccountStatementType); commandParams.Add("@p_StatementmentPeriodDate", data.StatementPeriodDate); if (data.StatementPeriodID.HasValue) { commandParams.Add("@p_StatementPeriodID", data.StatementPeriodID.Value); } if (data.ClientID.HasValue) { commandParams.Add("@p_ClientID", data.ClientID.Value); } DynamicList lst = DynamicList.GetData("[dbo].[spCCR_AccountStatementDetails_SelectForGrid]", commandParams); if (lst.Count > 0) { var data1 = (JArray)lst[0].GetValue("Data"); return(data1); } return(null); }
public JArray SearchAccountStatementSummary([FromBody] AccountStatementSearch data) { Dictionary <string, object> commandParams = new Dictionary <string, object>(); if (data.AccountID.HasValue) { commandParams.Add("@p_AccountID", data.AccountID.Value); } if (data.AdministratorID.HasValue) { commandParams.Add("@p_AdministratorID", data.AdministratorID.Value); } commandParams.Add("@p_AccountStatementType", data.AccountStatementType); commandParams.Add("@p_StatementmentPeriodDate", data.StatementPeriodDate); if (data.StatementPeriodID.HasValue) { commandParams.Add("@p_StatementPeriodID", data.StatementPeriodID.Value); } if (data.ClientID.HasValue) { commandParams.Add("@p_ClientID", data.ClientID.Value); } DynamicList lst = DynamicList.GetData("[dbo].[spCCR_AccountStatementSummary_SelectForGrid]", commandParams); if (lst.Count > 0) { return(lst.GetJson()); } return(null); }
private void ShowAccountStatement_Click(object sender, EventArgs e) { Account_BO accountBO = new Account_BO(); ArrayList list = new ArrayList(accountBO.readAccount()); if (AccountStatementSearch.Text == "" || stYear.Text == "") { MessageBox.Show("Wrong!!! Enter the information fully"); } else { try { int flag = 0; int flag1 = 0; int i1 = 0, i2 = 0; for (int i = 0; i < list.Count; i++) { if (list[i].ToString() == AccountStatementSearch.Text) { flag = 1; i1 = i; break; } } for (int i = i1; list[i].ToString() != "*****"; i++) { if (list[i].ToString() == stYear.Text) { flag1 = 1; i2 = i; break; } } if (flag == 1 && flag1 == 1) { try { Home_Admin_AccountStatement_Show home_Admin_AccountStatement_Show = new Home_Admin_AccountStatement_Show(); home_Admin_AccountStatement_Show.giveIndex(i1); home_Admin_AccountStatement_Show.giveYear(i2); this.Hide(); home_Admin_AccountStatement_Show.Show(); } catch (Exception) { MessageBox.Show("Error!!!"); } } if (flag == 0) { MessageBox.Show("Sorry!!! This account number isn't Exist"); AccountStatementSearch.Clear(); } if (flag1 == 0) { MessageBox.Show("Sorry!!! This year isn't Exist"); stYear.ResetText(); } } catch (Exception) { MessageBox.Show("No User Exists"); } } }