public ActionResult ReportBalanceSheetAccounts(BackEndReportBalanceSheetAccountList backEndReportBalanceSheetAccountList) { ReportBalanceSheetAccountModel reportBalanceSheetAccountModel = new ReportBalanceSheetAccountModel(); var allItems_DmDvcs = RefDataHelper.GetAllItems_DmDvcs(); if (allItems_DmDvcs != null && allItems_DmDvcs.Count > 0) { backEndReportBalanceSheetAccountList.DmDvcss = allItems_DmDvcs; } // SET DATEFORMAT DMY; // EXEC sp_glcd2 '01/01/2018','30/07/2018','04%' backEndReportBalanceSheetAccountList.ReportBalanceSheetAccounts = reportBalanceSheetAccountModel.GetAll( string.Concat(backEndReportBalanceSheetAccountList.MaDonVi, "%"), //Using the SQL % Wildcard backEndReportBalanceSheetAccountList.StartDate, backEndReportBalanceSheetAccountList.EndDate ); if (backEndReportBalanceSheetAccountList.ReportBalanceSheetAccounts.IsNull() || backEndReportBalanceSheetAccountList.ReportBalanceSheetAccounts.Count == 0) { ModelState.AddResult(ViewData, ModelStateResult.Error, Resources.Strings.NoDataFound); } return(View(backEndReportBalanceSheetAccountList)); }
public ActionResult ReportLedgerAnAccounts(BackEndReportLedgerAnAccountList backEndReportLedgerAnAccountList) { ReportLedgerAnAccountModel reportLedgerAnAccountModel = new ReportLedgerAnAccountModel(); if (BackEndSessions.CurrentUser != null && !string.IsNullOrWhiteSpace(BackEndSessions.CurrentUser.Dvcs)) { var allItems_DmTk = RefDataHelper.GetAllItems_DmTk(BackEndSessions.CurrentUser.Dvcs); if (allItems_DmTk != null && allItems_DmTk.Count > 0) { backEndReportLedgerAnAccountList.DmTks = allItems_DmTk.OrderBy(m => m.Ten_Tk_UTF8).ToList(); } } var allItems_DmDvcs = RefDataHelper.GetAllItems_DmDvcs(); if (allItems_DmDvcs != null && allItems_DmDvcs.Count > 0) { backEndReportLedgerAnAccountList.DmDvcss = allItems_DmDvcs; } // SET DATEFORMAT DMY; // EXEC usp_Nkc_SoCaiMotTaiKhoanBak // @_DocDate1 = '01/01/2018', // @_DocDate2 = '10/01/2018', // @_Account = '111', // @_BranchCode = '04', // @_IsCurrency = 1 //Correct data before execute stored procedure if (backEndReportLedgerAnAccountList.UserId.IsNotEmptyOrWhiteSpace()) { backEndReportLedgerAnAccountList.UserId = backEndReportLedgerAnAccountList.UserId.Trim(); } backEndReportLedgerAnAccountList.ReportLedgerAnAccounts = reportLedgerAnAccountModel.GetAll( backEndReportLedgerAnAccountList.UserId, backEndReportLedgerAnAccountList.MaDonVi, backEndReportLedgerAnAccountList.StartDate, backEndReportLedgerAnAccountList.EndDate, backEndReportLedgerAnAccountList.MauBaoCao, backEndReportLedgerAnAccountList.NgoaiTe ); if (backEndReportLedgerAnAccountList.IsNull() || backEndReportLedgerAnAccountList.ReportLedgerAnAccounts.IsNull() || backEndReportLedgerAnAccountList.ReportLedgerAnAccounts.ListLedgerAnAccount.IsNull() || backEndReportLedgerAnAccountList.ReportLedgerAnAccounts.ListLedgerAnAccount.Count == 0) { ModelState.AddResult(ViewData, ModelStateResult.Error, Resources.Strings.NoDataFound); } return(View(backEndReportLedgerAnAccountList)); }
public ActionResult ReportDebtDetails(BackEndReportDebtDetailList backEndReportDebtDetailList) { ReportDebtDetailModel reportDebtDetailModel = new ReportDebtDetailModel(); if (BackEndSessions.CurrentUser != null && !string.IsNullOrWhiteSpace(BackEndSessions.CurrentUser.Dvcs)) { var allItems_DmTk = RefDataHelper.GetAllItems_DmTk(BackEndSessions.CurrentUser.Dvcs); if (allItems_DmTk != null && allItems_DmTk.Count > 0) { // Lọc chọn ra những tài khoản công nợ backEndReportDebtDetailList.DmTks = allItems_DmTk.Where(m => m.Tk_Cn == 1).OrderBy(m => m.Ten_Tk_UTF8).ToList(); } var allItems_DmKh = RefDataHelper.GetAllItems_DmKh(BackEndSessions.CurrentUser.Dvcs); if (allItems_DmKh != null && allItems_DmKh.Count > 0) { backEndReportDebtDetailList.DmKhs = allItems_DmKh.OrderBy(m => m.Ten_Kh_UTF8).ToList(); } } var allItems_DmDvcs = RefDataHelper.GetAllItems_DmDvcs(); if (allItems_DmDvcs != null && allItems_DmDvcs.Count > 0) { backEndReportDebtDetailList.DmDvcss = allItems_DmDvcs; } // SET DATEFORMAT DMY; // EXEC sp_arso1 '131%','%','01/01/2018','30/06/2018','04' backEndReportDebtDetailList.ReportDebtDetails = reportDebtDetailModel.GetAll( string.Concat(backEndReportDebtDetailList.UserId, "%"), //Using the SQL % Wildcard string.Concat(backEndReportDebtDetailList.CustomerId, "%"), //Using the SQL % Wildcard string.Concat(backEndReportDebtDetailList.MaDonVi, "%"), //Using the SQL % Wildcard backEndReportDebtDetailList.StartDate, backEndReportDebtDetailList.EndDate, backEndReportDebtDetailList.ChiTietTheoHH, backEndReportDebtDetailList.MauBaoCao, backEndReportDebtDetailList.NgoaiTe ); if (backEndReportDebtDetailList.IsNull() || backEndReportDebtDetailList.ReportDebtDetails.IsNull() || backEndReportDebtDetailList.ReportDebtDetails.ListDebtDetail.IsNull() || backEndReportDebtDetailList.ReportDebtDetails.ListDebtDetail.Count == 0) { ModelState.AddResult(ViewData, ModelStateResult.Error, Resources.Strings.NoDataFound); } return(View(backEndReportDebtDetailList)); }
public ActionResult TenantAddEdit(int?id) { string username = BackEndSessions.CurrentUser.UserName; BackEndTenantAddEdit tenantAddEdit = new BackEndTenantAddEdit(); if (id.IsNotNull()) { Tenants tenants = new Tenants(); var tenant = tenants.FilterById(id); if (tenant.IsNotNull()) { tenant.UserName = tenant.MST; //Important tenantAddEdit.Id = tenant.Id; tenantAddEdit.Name = tenant.Name; tenantAddEdit.NameEn = tenant.NameEn; tenantAddEdit.MST = tenant.MST; tenantAddEdit.Dvcs = tenant.Dvcs; tenantAddEdit.Email = tenant.Email; tenantAddEdit.Phone = tenant.Phone; tenantAddEdit.UserName = tenant.UserName; tenantAddEdit.Representative = tenant.Representative; tenantAddEdit.Domain = tenant.Domain; tenantAddEdit.Address = tenant.Address; tenantAddEdit.ServerName = tenant.ServerName; tenantAddEdit.DbName = tenant.DbName; tenantAddEdit.DbUserName = tenant.DbUserName; tenantAddEdit.DbPassword = SecurityHelper.Decrypt(tenant.DbPassword); tenantAddEdit.DbPort = tenant.DbPort; tenantAddEdit.DateIssue = tenant.DateIssue.ToDateTimeString(); tenantAddEdit.DateActive = tenant.DateActive.ToDateTimeString(); } } var allItems_DmDvcs = RefDataHelper.GetAllItems_DmDvcs(); if (allItems_DmDvcs != null && allItems_DmDvcs.Count > 0) { tenantAddEdit.DmDvcss = allItems_DmDvcs; } tenantAddEdit.ShowHideDbName = (username == "Administrator"); // Ẩn hiện để sửa Connection String return(View(tenantAddEdit)); }