public JArray Search([FromBody] TransactionActionSearch 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); commandParams.Add("@p_RefundAction", data.RefundAction); commandParams.Add("@p_FromDate", data.FromDate); commandParams.Add("@p_ToDate", data.ToDate); if (data.BatchId.HasValue) { commandParams.Add("@p_BatchId", data.BatchId.Value); } DynamicList lst = DynamicList.GetData("[dbo].[spCCR_GetTransactionActionForGrid]", commandParams); if (lst.Count > 0) { var data1 = (JArray)lst[0].GetValue("Data"); return(data1); } return(null); }
public JArray Search([FromBody] HomeSearch data) { Dictionary <string, object> commandParams = new Dictionary <string, object>(); commandParams.Add("@p_SortColumn", data.SortColumn); commandParams.Add("@p_SortOrder", data.SortOrder); commandParams.Add("@p_PageStart", data.PageStart); if (data.PageSize > 0) { commandParams.Add("@p_PageSize", data.PageSize); } commandParams.Add("@p_ApplicationUserID", CurrentUserID); if (data.HomeID.HasValue) { commandParams.Add("@p_HomeID", data.HomeID.Value); } commandParams.Add("@p_ShowInactive", data.ShowInactive); DynamicList lst = DynamicList.GetData("spCFM_Home_SelectForGrid", commandParams); if (lst.Count > 0) { return((JArray)lst[0].GetValue("Data")); } return(null); }
public JArray Search([FromBody] EmailTemplateSearch 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); commandParams.Add("@p_RefundAction", data.Description); commandParams.Add("@p_FromDate", data.MailingSubject); commandParams.Add("@p_ToDate", data.MailingText); DynamicList lst = DynamicList.GetData("[dbo].[spCCR_GetTransactionActionForGrid]", commandParams); if (lst.Count > 0) { var data1 = (JArray)lst[0].GetValue("Data"); return(data1); } return(null); }
public JArray Search([FromBody] ApplicationUserSearch 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.ApplicationRoleID.HasValue) { commandParams.Add("@p_ApplicationRoleID", data.ApplicationRoleID); } if (data.ApplicationUserID.HasValue) { commandParams.Add("@p_ApplicationUserID", data.ApplicationUserID); } commandParams.Add("@p_LoginName", data.LoginName); DynamicList lst = DynamicList.GetData("[dbo].[spCFM_ApplicationUser_SelectForGrid]", commandParams); if (lst.Count > 0) { var data1 = (JArray)lst[0].GetValue("Data"); return(data1); } return(null); }
public JArray Get(int glAccountId) { Dictionary <string, object> commandParams = new Dictionary <string, object>(); commandParams.Add("@p_GLAccountId", glAccountId); return(DynamicList.GetData("[dbo].[spCFM_GetAccountDetailsByGLAccountID]", commandParams).GetJson()); }
public JArray GetBudget(int budgetID) { Dictionary <string, object> commandParams = new Dictionary <string, object>(); commandParams.Add("p_BudgetID", budgetID); DynamicList lst = DynamicList.GetData("spCFM_BudgetLine_Details", commandParams); return(lst.GetJson()); }
public JArray Get(int userID) { Dictionary <string, object> commandParams = new Dictionary <string, object>(); commandParams.Add("@p_ApplicationUserID", userID); DynamicList lst = DynamicList.GetData("[dbo].[spCFM_ApplicationUser_SelectForEdit]", commandParams); return(lst.GetJson()); }
public JArray GetHomeDetails(int homeID) { Dictionary <string, object> commandParams = new Dictionary <string, object>(); commandParams.Add("@p_HomeID", homeID); DynamicList lst = DynamicList.GetData("spCFM_HomeDetails_Select", commandParams); return(lst.GetJson()); }
public JArray GetDataOptionTypeSort() { DynamicList lst = DynamicList.GetData("spCFM_DataOptionTypeSort_Select", null); if (lst.Count > 0) { return((JArray)lst[0].GetValue("Data")); } return(null); }
public JArray Get() { DynamicList lst = DynamicList.GetData("spCFM_MailingTemplate_Select", null); if (lst.Count > 0) { return((JArray)lst[0].GetValue("Data")); } return(null); }
public JArray GetEditableOptionTypes() { Dictionary <string, object> commandParams = new Dictionary <string, object>(); DynamicList lst = DynamicList.GetData("spCFM_DataOptionType_SelectForEdit", commandParams); if (lst.Count > 0) { return((JArray)lst[0].GetValue("Data")); } return(null); }
public JArray Search([FromBody] BaseGridSearch data) { Dictionary <string, object> commandParams = data.GetParams(); DynamicList lst = DynamicList.GetData("spCFM_SystemRole_SelectForGrid", commandParams); if (lst.Count > 0) { return((JArray)lst[0].GetValue("Data")); } return(null); }
public JArray GetHomeGLAccountDetails(int homeID) { Dictionary <string, object> commandParams = new Dictionary <string, object>(); commandParams.Add("@p_HomeID", homeID); DynamicList lst = DynamicList.GetData("spCFM_HomeGLAccountDetails_Select", commandParams); if (lst.Count > 0) { return((JArray)lst[0].GetValue("Data")); } return(null); }
public JArray Search([FromBody] AccountSearch 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_GLAccountID", data.AccountID.Value); } if (data.AccountTypeID.HasValue) { commandParams.Add("@p_GLAccountTypeID", data.AccountTypeID.Value); } if (data.AdministratorID.HasValue) { commandParams.Add("@p_AdministratorID", data.AdministratorID.Value); } if (data.EntityTypeID.HasValue) { commandParams.Add("@p_EntityTypeID", data.EntityTypeID.Value); } if (data.EntityID.HasValue) { commandParams.Add("@p_EntityID", data.EntityID.Value); } commandParams.Add("@p_HighBalanceOnly", data.HighBalanceOnly); commandParams.Add("@p_ShowInactive", data.ShowInactive); DynamicList lst = DynamicList.GetData("[dbo].[spCFM_GLAccount_SelectForGrid]", commandParams); if (lst.Count > 0) { var data1 = (JArray)lst[0].GetValue("Data"); return(data1); } return(null); }
public JArray GetBankCards(int?bankAccountId) { Dictionary <string, object> commandParams = new Dictionary <string, object>(); if (bankAccountId.HasValue) { commandParams.Add("p_BankAccountID", bankAccountId); } DynamicList lst = DynamicList.GetData("spCFM_BankAccountCard_Select", commandParams); if (lst.Count > 0) { return((JArray)lst[0].GetValue("Data")); } return(null); }
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 SearchByApplicationRole([FromBody] SystemRoleSearch data) { Dictionary <string, object> commandParams = data.GetParams(); if (data.ApplicationRoleID.HasValue) { commandParams.Add("@p_ApplicationRoleID", data.ApplicationRoleID.Value); } DynamicList lst = DynamicList.GetData("spCFM_SystemRole_ByApplicationRole", commandParams); if (lst.Count > 0) { return((JArray)lst[0].GetValue("Data")); } return(null); }
public JArray Get(int homeID, int?budgetID) { Dictionary <string, object> commandParams = new Dictionary <string, object>(); commandParams.Add("p_HomeID", homeID); if (budgetID.HasValue) { commandParams.Add("p_BudgetID", budgetID.Value); } DynamicList lst = DynamicList.GetData("spCFM_BudgetDetails_Home", commandParams); if (lst.Count > 0) { return((JArray)lst[0].GetValue("Data")); } return(null); }
public JArray Search([FromBody] CFMData.ApplicationRoleSearch data) { Dictionary <string, object> commandParams = data.GetParams(); if (data.ApplicationRoleID.HasValue) { commandParams.Add("@p_ApplicationRoleID", data.ApplicationRoleID.Value); } commandParams.Add("@p_Search", data.Name); commandParams.Add("@p_ShowInactive", data.ShowInactive); DynamicList lst = DynamicList.GetData("spCFM_ApplicationRole_SelectForGrid", commandParams); if (lst.Count > 0) { return((JArray)lst[0].GetValue("Data")); } 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); }
public JArray Get(string code, string term, string ParentID = null, int?CurrentID = null, string SecondParentID = null, string thirdParent = null, string fourthParent = null, string fifthParent = null, string currentSelections = null) { Dictionary <string, object> commandParams = new Dictionary <string, object>(); commandParams.Add("p_code", code); if (!string.IsNullOrEmpty(term) && term != "EMPTY") { commandParams.Add("p_term", term); } else { commandParams.Add("p_term", ""); } if (!string.IsNullOrEmpty(ParentID) && ParentID != "EMPTY") { commandParams.Add("p_ParentID", ParentID); } if (CurrentID.HasValue && CurrentID != -99999) { commandParams.Add("p_CurrentID", CurrentID.Value); } if (!string.IsNullOrEmpty(SecondParentID) && SecondParentID != "EMPTY") { commandParams.Add("p_SecondParentID", SecondParentID); } if (!string.IsNullOrEmpty(thirdParent) && thirdParent != "EMPTY") { commandParams.Add("p_thirdParent", thirdParent); } if (!string.IsNullOrEmpty(fourthParent) && fourthParent != "EMPTY") { commandParams.Add("p_fourthParent", fourthParent); } if (!string.IsNullOrEmpty(fifthParent) && fifthParent != "EMPTY") { commandParams.Add("p_fifthParent", fifthParent); } if (!string.IsNullOrEmpty(currentSelections) && currentSelections != "EMPTY") { commandParams.Add("p_currentSelections", currentSelections); } DynamicList lst = DynamicList.GetData("spCFM_AutoText", commandParams); if (lst.Count > 0) { return((JArray)lst[0].GetValue("Data")); } return(null); }
public async Task <LoginUserResponse> SigninUser(string LoginName) { LoginUserResponse resp = new LoginUserResponse(); resp.IsSuccess = false; if (!string.IsNullOrEmpty(LoginName)) { var claims = new List <Claim> { new Claim(ClaimTypes.Name, LoginName) //,new Claim(UserClaims.Suppliers.ToString(), jToken.ToString()) }; Dictionary <string, object> commandParams = new Dictionary <string, object>(); commandParams.Add("p_username", LoginName); DynamicList lst = DynamicList.GetData("spCFM_ApplicationUser_Details", commandParams); string systemRoles = ""; string userRegions = ""; string userSuppliers = ""; if (lst.Count > 0) { JArray dbData = (JArray)lst[0].GetValue("Data"); if (dbData.Count > 0) { foreach (JToken jToken in dbData) { resp.MustChangePassword = jToken.Value <Boolean>("mustChangePassword"); resp.ForceChangePassword = jToken.Value <Boolean>("forceChangePassword"); systemRoles = jToken.Value <string>("systemRoleName"); if (!string.IsNullOrEmpty(systemRoles)) { claims.Add(new Claim(UserClaims.Roles.ToString(), systemRoles)); } resp.roles = systemRoles; claims.Add(new Claim(CFMCommon.UserClaims.UserID.ToString(), jToken["applicationUserID"].ToString())); break; } } } //claims.Add(new Claim(UserClaims.Suppliers.ToString(), userSuppliers)); //claims.Add(new Claim(UserClaims.Regions.ToString(), userRegions)); ClaimsIdentity userIdentity = new ClaimsIdentity(claims, "login"); ClaimsPrincipal principal = new ClaimsPrincipal(userIdentity); var authProperties = new AuthenticationProperties { AllowRefresh = true, ExpiresUtc = DateTimeOffset.UtcNow.AddSeconds(86400), IsPersistent = true, IssuedUtc = DateTimeOffset.UtcNow, RedirectUri = null }; //await HttpContext.SignInAsync(principal); await HttpContext.SignInAsync(CookieAuthenticationDefaults.AuthenticationScheme, principal, authProperties); resp.IsSuccess = true; //resp.suppliers = userSuppliers; //resp.regions = userRegions; resp.userName = LoginName; } return(resp); }