public AccountHeadService()
 {
     _dbContext      = new MFISDBContext();
     _commonService  = new CommonService();
     _accountHeadDll = new AccountHeadDll();
     AutoMapperEntityConfiguration.Configure();
 }
Beispiel #2
0
        public ActionResult CreateLoanSecurityMaster(LoanSecurityMasterModel objLoanSecurityMasterModel)
        {
            var resultDto = new ResultDto();

            if (ModelState.IsValid)
            {
                var loansecurityMasterDto = Mapper.Map <LoanSecurityMasterModel, LoanSecurityMasterDto>(objLoanSecurityMasterModel);
                loansecurityMasterDto.UserID = UserInfo.UserID;
                if (loansecurityMasterDto.LoanSecurityID > 0)
                {
                    resultDto = _loansecurityMasterService.Update(loansecurityMasterDto);
                }
                else
                {
                    resultDto = _loansecurityMasterService.Insert(loansecurityMasterDto);
                }
                if (resultDto.ObjectId > 0)
                {
                    loansecurityMasterDto      = _loansecurityMasterService.GetByID(resultDto.ObjectId);
                    objLoanSecurityMasterModel = AutoMapperEntityConfiguration.Cast <LoanSecurityMasterModel>(loansecurityMasterDto);
                    resultDto.ObjectCode       = objLoanSecurityMasterModel.LoanSecurityCode;
                }
            }
            SelectList loansecuritymaster = GetDropDownListByMasterCode(Enums.RefMasterCodes.LOAN_SECURITY_TYPE);

            ViewBag.LoanSecurityMaster = loansecuritymaster;

            ViewBag.Result = resultDto;

            return(View(objLoanSecurityMasterModel));
        }
        public ActionResult AddEditSubGroupAccountHead(AccountHeadModel accountHeadModel, FormCollection form)
        {
            ResultDto result = new ResultDto();

            //if (ModelState.IsValid)
            //{
            accountHeadModel.UserID       = 1;
            accountHeadModel.StatusID     = 1;
            accountHeadModel.IsFederation = false;
            accountHeadModel.AHID         = accountHeadModel.EditAHID > 0 ? accountHeadModel.EditAHID : accountHeadModel.AHID;
            accountHeadModel.AHCode       = !string.IsNullOrEmpty(accountHeadModel.SubGroupAHCode)
                ? accountHeadModel.SubGroupAHCode
                : accountHeadModel.AHCode;
            accountHeadModel.AHName = !string.IsNullOrEmpty(accountHeadModel.SubGroupAHName)
                ? accountHeadModel.SubGroupAHName
                : accountHeadModel.AHName;
            AccountHeadDto accountHeadDto = AutoMapperEntityConfiguration.Cast <AccountHeadDto>(accountHeadModel);

            if (accountHeadModel.AHID > 0)
            {
                result = _accountHeadService.Update(accountHeadDto);
            }
            else
            {
                result = _accountHeadService.Insert(accountHeadDto);
            }
            //}

            TempData["SuccessMsg"] = result;
            return(RedirectToAction("AccountTree"));
        }
Beispiel #4
0
        public ActionResult CreateGroup(int?id)
        {
            GroupModel           groupModel  = new GroupModel();
            List <SelectListDto> lstVillages = _villageService.GetVillageSelectList();
            SelectList           slVillages  = new SelectList(lstVillages, "ID", "Text");

            List <SelectListDto> lstClusters = _clusterService.GetClusterSelectList();
            SelectList           slClusters  = new SelectList(lstClusters, "ID", "Text");

            SelectList slMeetingFrrequency = GetDropDownListByMasterCode(Enums.RefMasterCodes.MEETING_FREQUENCY);

            List <SelectListDto> lstpanchayats = _panchayatService.GetPanchayatSelectList();
            SelectList           slPanchayat   = new SelectList(lstpanchayats, "ID", "Text");

            ViewBag.villages   = slVillages;
            ViewBag.clusters   = slClusters;
            ViewBag.panchayats = slPanchayat;

            ViewBag.MeetingFrrequency = slMeetingFrrequency;

            GroupMasterDto groupMasterDto = new GroupMasterDto();

            if (id.HasValue && id.Value > 0)
            {
                groupMasterDto = _groupService.GetByID(id.Value);

                groupModel = AutoMapperEntityConfiguration.Cast <GroupModel>(groupMasterDto);
            }
            LoadRegularSavingAccountHeadDropDown();
            ViewBag.Result = new ResultDto();
            return(View("CreateGroup", groupModel));
        }
 public MemberLoanDisbursementService()
 {
     _LoanDisbursementDataAccess       = new LoanDisbursementDataAccess();
     _MemberLoanDisbursementDataAccess = new MemberLoanDisbursementDataAccess();
     _dbContext = new MFISDBContext();
     AutoMapperEntityConfiguration.Configure();
 }
Beispiel #6
0
        public ActionResult AddBank(string id)
        {
            _log.Info("AddBank() HTTP GET METHOD BEGIN");
            BankMasterModel bankMasterModel = new BankMasterModel();

            try
            {
                int bankId = string.IsNullOrEmpty(id.DecryptString()) ? default(int) : Convert.ToInt32(id.DecryptString());

                SelectList bankNames    = GetDropDownListByMasterCode(Enums.RefMasterCodes.BANK_NAME);
                SelectList accountTypes = GetDropDownListByMasterCode(Enums.RefMasterCodes.BANK_ACCOUNT_TYPE);
                ViewBag.BankNames    = bankNames;
                ViewBag.AccountTypes = accountTypes;
                BankMasterDto bankMasterDto = new BankMasterDto();
                if (bankId > 0)
                {
                    bankMasterDto   = _bankService.GetByID(bankId);
                    bankMasterModel = AutoMapperEntityConfiguration.Cast <BankMasterModel>(bankMasterDto);
                }


                ViewBag.Result = new ResultDto();
            }
            catch (Exception ex)
            {
                _log.Error("Error : Error occured in AddBank() Http Get Method", ex);
            }
            _log.Info("AddBank() HTTP GET METHOD END");

            return(View("AddBank", bankMasterModel));
        }
Beispiel #7
0
        public ActionResult AddBank(BankMasterModel bankMasterModel)
        {
            ResultDto resultDto = new ResultDto();

            if (ModelState.IsValid)
            {
                var bankMasterDto = Mapper.Map <BankMasterModel, BankMasterDto>(bankMasterModel);
                bankMasterDto.UserID        = UserInfo.UserID;
                bankMasterDto.isMasterEntry = true;
                if (bankMasterModel.BankEntryID == 0)
                {
                    resultDto = _bankService.Insert(bankMasterDto);
                }
                else
                {
                    resultDto = _bankService.Update(bankMasterDto);
                }
                if (resultDto.ObjectId > 0)
                {
                    bankMasterDto        = _bankService.GetByID(resultDto.ObjectId);
                    bankMasterModel      = AutoMapperEntityConfiguration.Cast <BankMasterModel>(bankMasterDto);
                    resultDto.ObjectCode = bankMasterDto.BankCode;
                }
            }

            SelectList bankNames    = GetDropDownListByMasterCode(Enums.RefMasterCodes.BANK_NAME);
            SelectList accountTypes = GetDropDownListByMasterCode(Enums.RefMasterCodes.BANK_ACCOUNT_TYPE);

            ViewBag.BankNames    = bankNames;
            ViewBag.AccountTypes = accountTypes;

            ViewBag.Result = resultDto;
            return(View("AddBank", bankMasterModel));
        }
Beispiel #8
0
        public ActionResult CreateProject(string id)
        {
            int projectId          = string.IsNullOrEmpty(id.DecryptString()) ? default(int) : Convert.ToInt32(id.DecryptString());
            var projectMasterDto   = new ProjectDto();
            var projectMasterModel = new ProjectModel();

            if (projectId > 0)
            {
                projectMasterDto        = _projectService.GetByID(projectId);
                projectMasterDto.UserID = UserInfo.UserID;
                projectMasterModel      = AutoMapperEntityConfiguration.Cast <ProjectModel>(projectMasterDto);
            }
            #region DropDowns
            List <SelectListDto> fundSourceSelectList = _fundSourceService.GetFundSourceSelectList();
            SelectList           SlstfoundSource      = new SelectList(fundSourceSelectList, "ID", "Text", projectMasterDto.FundSourceID);
            ViewBag.foundSource = SlstfoundSource;

            SelectList projectPurposes = GetDropDownListByMasterCode(Enums.RefMasterCodes.PRJ_PURPOSE);
            ViewBag.ProjectPurposes = projectPurposes;

            SelectList projectTypes = GetDropDownListByMasterCode(Enums.RefMasterCodes.PRJ_TYPES);
            ViewBag.ProjectTypes = projectTypes;
            #endregion DropDowns
            ViewBag.Result = new ResultDto();
            return(View("CreateProject", projectMasterModel));
        }
Beispiel #9
0
        public MemberKYCDto GetByKycID(int memberkycId)
        {
            var objuspMemberKYCGetByMemberKYCIDResult = _dbContext.uspMemberKYCGetByMemberKYCID(memberkycId).ToList().FirstOrDefault();

            MemberKYCDto objMemberKYCDto = AutoMapperEntityConfiguration.Cast <MemberKYCDto>(objuspMemberKYCGetByMemberKYCIDResult);

            return(objMemberKYCDto);
        }
Beispiel #10
0
        public ProjectDto GetByID(int projectID)
        {
            uspProjectGetById_Result objuspProjectMasterGetByIdResult = _dbContext.uspProjectGetById(projectID).ToList().FirstOrDefault();

            ProjectDto objProjectMasterDto = AutoMapperEntityConfiguration.Cast <ProjectDto>(objuspProjectMasterGetByIdResult);

            return(objProjectMasterDto);
        }
        public GroupMeetingService()
        {
            _dbContext = new MFISDBContext();

            _commonService = new CommonService();

            AutoMapperEntityConfiguration.Configure();
        }
Beispiel #12
0
        public ClusterDto GetByID(int clusterID)
        {
            var objuspClusterGetByIdResult = _dbContext.uspClusterGetByID(clusterID).ToList().FirstOrDefault();

            ClusterDto objClusterDto = AutoMapperEntityConfiguration.Cast <ClusterDto>(objuspClusterGetByIdResult);

            return(objClusterDto);
        }
Beispiel #13
0
        public BranchDto GetByID(int branchId)
        {
            var objuspBranchGetByIdResult = _dbContext.uspBranchGetById(branchId).ToList().FirstOrDefault();

            BranchDto objBranchDto = AutoMapperEntityConfiguration.Cast <BranchDto>(objuspBranchGetByIdResult);

            return(objBranchDto);
        }
Beispiel #14
0
        //public List<BankMasterLookupDto> GetLookup()
        //{
        //    var lstBankMasterLookupDtos = new List<BankMasterLookupDto>();
        //    var uspBankMasterLookupResults = _dbContext.uspBankMasterLookup().ToList();
        //    foreach (var bank in uspBankMasterLookupResults)
        //    {
        //        BankMasterLookupDto lookupDto = Mapper.Map<uspBankMasterLookup_Result, BankMasterLookupDto>(bank);
        //        lstBankMasterLookupDtos.Add(lookupDto);
        //    }

        //    return lstBankMasterLookupDtos;
        //}


        public BankMasterDto GetByID(int bankEntryId)
        {
            uspBankMasterGetByBankId_Result objuspBankMasterGetByBankIdResult =
                _dbContext.uspBankMasterGetByBankId(bankEntryId).ToList().FirstOrDefault();
            BankMasterDto objBankMasterDto = AutoMapperEntityConfiguration.Cast <BankMasterDto>(objuspBankMasterGetByBankIdResult);

            return(objBankMasterDto);
        }
Beispiel #15
0
        public MandalDto GetByID(int MandalID)
        {
            var objuspMandalGetByIdResult = _dbContext.uspMandalGetByID(MandalID).ToList().FirstOrDefault();

            MandalDto objMandalDto = AutoMapperEntityConfiguration.Cast <MandalDto>(objuspMandalGetByIdResult);

            return(objMandalDto);
        }
        public EmployeeKYCDto GetByKycID(int employeekycId)
        {
            var objuspEmployeeKYCGetByEmployeeKYCIDResult = _dbContext.uspEmployeeKYCGetByEmployeeKYCID(employeekycId).ToList().FirstOrDefault();

            EmployeeKYCDto objEmployeeKYCDto = AutoMapperEntityConfiguration.Cast <EmployeeKYCDto>(objuspEmployeeKYCGetByEmployeeKYCIDResult);

            return(objEmployeeKYCDto);
        }
        public GroupJournalService1()
        {
            _dbContext = new MFISDBContext();
            _dbContext.Configuration.LazyLoadingEnabled = false;

            AutoMapperEntityConfiguration.Configure();
            _commonService = new CommonService();
        }
Beispiel #18
0
        public MemberService()
        {
            _dbContext = new MFISDBContext();

            _commonService = new CommonService();

            AutoMapperEntityConfiguration.Configure();
        }
Beispiel #19
0
        //public ActionResult BindDropDowns(int parentAhid, int accountHeadLevel, string Id,bool isFederation)
        //{
        //    StringBuilder sbDropdownOptions = new StringBuilder();
        //    #region ddlEditSubGroup

        //    if (Id == "SubGroup")
        //    {
        //        StringBuilder sbAccountHeadOptions = new StringBuilder();
        //        StringBuilder sbSubGroupOptions = new StringBuilder();


        //        if (accountHeadLevel == 4)
        //        {
        //            var dropDownAccountHeadOptions = (from item in AccountHeadDtos
        //                                              where item.ParentAHID == parentAhid && item.IsFederation && item.AHLevel == 4
        //                                              select new { AHCode = item.AHID + "_" + item.AHCode, AhName = item.AHName }
        //                                );
        //            foreach (var dropDownOption in dropDownAccountHeadOptions)
        //            {
        //                sbSubGroupOptions.Append("<option value='" + dropDownOption.AHCode + "'>" + dropDownOption.AhName + "</option>");
        //            }
        //        }
        //        else
        //        {
        //            var dropDownSubGroupOptions = (from item in AccountHeadDtos
        //                                           where item.ParentAHID == parentAhid && item.IsFederation && item.AHLevel == 4
        //                                           select new { ParentAhid = item.AHID, AhName = item.AHName }
        //                                                );
        //            foreach (var dropDownOption in dropDownSubGroupOptions)
        //            {
        //                sbSubGroupOptions.Append("<option value='" + dropDownOption.ParentAhid + "'>" + dropDownOption.AhName + "</option>");
        //            }
        //        }


        //        if (accountHeadLevel == 5)
        //        {
        //            var dropDownAccountHeadOptions = (from item in AccountHeadDtos
        //                                              where item.ParentAHID == parentAhid && item.IsFederation && item.AHLevel == 5
        //                                              select new { AHCode = item.AHID + "_" + item.AHCode, AhName = item.AHName }
        //                                );
        //            foreach (var dropDownOption in dropDownAccountHeadOptions)
        //            {
        //                sbAccountHeadOptions.Append("<option value='" + dropDownOption.AHCode + "'>" + dropDownOption.AhName + "</option>");
        //            }
        //        }

        //        return Json(new { AccountHeadOptions = sbAccountHeadOptions != null ? sbAccountHeadOptions.ToString() : "", SubGroupOptions = sbSubGroupOptions != null ? sbSubGroupOptions.ToString() : "" });

        //    }
        //    #endregion ddlEditSubGroup
        //    else if (Id == "SearchAccountHead")
        //    {

        //        var dropDownAccountHeadOptions = (from item in AccountHeadDtos
        //                                          where item.ParentAHID == parentAhid && item.IsFederation && item.AHLevel == 5
        //                                          select new { AHCode = item.AHID + "_" + item.AHCode, AhName = item.AHName }
        //                                   );
        //        foreach (var dropDownOption in dropDownAccountHeadOptions)
        //        {
        //            sbDropdownOptions.Append("<option value='" + dropDownOption.AHCode + "'>" + dropDownOption.AhName + "</option>");
        //        }

        //        return Json(new { DropDownOptions = sbDropdownOptions.ToString() });

        //    }
        //    else if (Id == "MoveSubGroupAccountHead")
        //    {
        //        var subGroupFields = (from item in AccountHeadDtos
        //                              where item.ParentAHID == parentAhid && item.IsFederation && item.AHLevel == 4
        //                              select new { ParentAhid = item.AHID, AhName = item.AHName }
        //                            );

        //        var accountHeadFields = (from item in AccountHeadDtos
        //                                 where item.ParentAHID == parentAhid && item.IsFederation && item.AHLevel == 5
        //                                 select new { ParentAhid = item.AHID, AhName = item.AHName }
        //                            );

        //        return Json(new { SubGroupFields = subGroupFields, AccountHeadFields = accountHeadFields });

        //    }
        //    else if (Id == "ViewBalanceAccountHead")
        //    {
        //        var dropDownOptions = (from item in AccountHeadDtos
        //                               where item.IsFederation && item.AHLevel == accountHeadLevel
        //                               select new { ParentAhid = item.AHID, AhName = item.AHName }
        //                            );

        //        foreach (var dropDownOption in dropDownOptions)
        //        {
        //            sbDropdownOptions.Append("<option value='" + dropDownOption.ParentAhid + "'>" + dropDownOption.AhName + "</option>");
        //        }

        //        return Json(new { DropDownOptions = sbDropdownOptions.ToString() });
        //    }
        //    else
        //    {
        //        var dropDownOptions = (from item in AccountHeadDtos
        //                               where item.ParentAHID == parentAhid && item.IsFederation
        //                               select new { ParentAhid = item.AHID, AhName = item.AHName }
        //                            );
        //        foreach (var dropDownOption in dropDownOptions)
        //        {
        //            sbDropdownOptions.Append("<option value='" + dropDownOption.ParentAhid + "'>" + dropDownOption.AhName + "</option>");
        //        }

        //        return Json(new { DropDownOptions = sbDropdownOptions.ToString() });

        //    }

        //}

        public ActionResult MoveSubGroupOrAccountHead(AccountHeadModel accountHeadModel)
        {
            accountHeadModel.UserID     = 1;
            accountHeadModel.StatusID   = 1;
            accountHeadModel.ParentAHID = accountHeadModel.ParentMoveAHID;
            AccountHeadDto accountHeadDto = AutoMapperEntityConfiguration.Cast <AccountHeadDto>(accountHeadModel);

            _accountHeadService.MoveAccountHead(accountHeadDto);
            return(RedirectToAction("GroupAccountTree"));
        }
Beispiel #20
0
        public OrganizationDto GetAll()
        {
            var objuspOrganizationGetAllResult = _dbContext.uspOrganizationGetAll(null).ToList().FirstOrDefault();

            OrganizationDto objOrganizationDto = new OrganizationDto();

            if (objuspOrganizationGetAllResult != null)
            {
                objOrganizationDto = AutoMapperEntityConfiguration.Cast <OrganizationDto>(objuspOrganizationGetAllResult);
            }

            return(objOrganizationDto);
        }
        public ActionResult MoveSubGroupOrAccountHead(AccountHeadModel accountHeadModel)
        {
            ResultDto result = new ResultDto();

            accountHeadModel.UserID     = 1;
            accountHeadModel.StatusID   = 1;
            accountHeadModel.ParentAHID = accountHeadModel.ParentMoveAHID;
            AccountHeadDto accountHeadDto = AutoMapperEntityConfiguration.Cast <AccountHeadDto>(accountHeadModel);

            result = _accountHeadService.MoveAccountHead(accountHeadDto);
            TempData["SuccessMsg"] = result;
            return(RedirectToAction("AccountTree"));
        }
        public ActionResult CreateVillage(FormCollection Form)
        {
            var resultDto = new ResultDto();

            int villageId = default(int);
            int clusterId = default(int);

            int.TryParse(Request.Form["VillageID"], out villageId);
            int.TryParse(Request.Form["ClusterID"], out clusterId);

            VillageModel objVillage = new VillageModel();

            objVillage.VillageID     = villageId;
            objVillage.ClusterID     = clusterId;
            objVillage.Village       = Convert.ToString(Request.Form["txtVillage"]);
            objVillage.TEVillageName = Convert.ToString(Request.Form["TEVillageName"]);
            objVillage.VillageCode   = Convert.ToString(Request.Form["VillageCode"]);

            if (ModelState.IsValid)
            {
                var villageDto = Mapper.Map <VillageModel, VillageDto>(objVillage);
                villageDto.UserID = UserInfo.UserID;
                if (villageDto.VillageID > 0)
                {
                    resultDto = _villageService.Update(villageDto);
                }
                else
                {
                    resultDto = _villageService.Insert(villageDto);
                }
                if (resultDto.ObjectId > 0)
                {
                    villageDto           = _villageService.GetByID(resultDto.ObjectId);
                    objVillage           = AutoMapperEntityConfiguration.Cast <VillageModel>(villageDto);
                    resultDto.ObjectCode = villageDto.VillageCode;
                }
            }

            LoadDropDowns(objVillage.StateID, objVillage.DistrictID, objVillage.MandalID, objVillage.ClusterID);
            ViewBag.Result = resultDto;
            return(View(objVillage));
        }
        public ActionResult AddEditSubGroupAccountHead(AccountHeadModel accountHeadModel, FormCollection form)
        {
            ResultDto result = new ResultDto();
            //if (ModelState.IsValid)
            //{
            bool isFederation = string.IsNullOrEmpty(form.Get("isFederation")) ? true : Convert.ToBoolean(form.Get("isFederation"));

            accountHeadModel.UserID       = 1;
            accountHeadModel.StatusID     = 1;
            accountHeadModel.IsFederation = isFederation;
            accountHeadModel.AHID         = accountHeadModel.EditAHID > 0 ? accountHeadModel.EditAHID : accountHeadModel.AHID;
            accountHeadModel.AHCode       = !string.IsNullOrEmpty(accountHeadModel.SubGroupAHCode)
                ? accountHeadModel.SubGroupAHCode
                : accountHeadModel.AHCode;
            accountHeadModel.AHName = !string.IsNullOrEmpty(accountHeadModel.SubGroupAHName)
                ? accountHeadModel.SubGroupAHName
                : accountHeadModel.AHName;
            accountHeadModel.TE_AHName = !string.IsNullOrEmpty(accountHeadModel.SubGroupTEAHName)
                ? accountHeadModel.SubGroupTEAHName
                : accountHeadModel.TE_AHName;
            AccountHeadDto accountHeadDto = AutoMapperEntityConfiguration.Cast <AccountHeadDto>(accountHeadModel);

            if (accountHeadModel.AHID > 0)
            {
                result = _accountHeadService.Update(accountHeadDto);
            }
            else
            {
                result = _accountHeadService.Insert(accountHeadDto);
            }
            //}
            ViewBag.IsFederation   = isFederation;
            TempData["SuccessMsg"] = result;
            if (isFederation)
            {
                return(RedirectToAction("AccountTree"));
            }
            else
            {
                return(RedirectToAction("GroupAccountTree"));
            }
        }
Beispiel #24
0
        public ActionResult CreateProject(ProjectModel objprojectModel)
        {
            ResultDto resultDto = new ResultDto();

            if (ModelState.IsValid)
            {
                var projectMasterDto = Mapper.Map <ProjectModel, ProjectDto>(objprojectModel);
                projectMasterDto.UserID = UserInfo.UserID;

                if (objprojectModel.ProjectID == 0)
                {
                    resultDto = _projectService.Insert(projectMasterDto);
                }
                else
                {
                    resultDto = _projectService.Update(projectMasterDto);
                }

                if (resultDto.ObjectId > 0)
                {
                    projectMasterDto     = _projectService.GetByID(resultDto.ObjectId);
                    objprojectModel      = AutoMapperEntityConfiguration.Cast <ProjectModel>(projectMasterDto);
                    resultDto.ObjectCode = projectMasterDto.ProjectCode;
                }
            }

            #region DropDowns
            var projectMasterdto = new ProjectDto();
            List <SelectListDto> fundSourceSelectList = _fundSourceService.GetFundSourceSelectList();
            SelectList           SlstfoundSource      = new SelectList(fundSourceSelectList, "ID", "Text", projectMasterdto.FundSourceID);
            ViewBag.foundSource = SlstfoundSource;

            SelectList projectPurposes = GetDropDownListByMasterCode(Enums.RefMasterCodes.PRJ_PURPOSE);
            ViewBag.ProjectPurposes = projectPurposes;

            SelectList projectTypes = GetDropDownListByMasterCode(Enums.RefMasterCodes.PRJ_TYPES);
            ViewBag.ProjectTypes = projectTypes;
            #endregion DropDowns

            ViewBag.Result = resultDto;
            return(View("CreateProject", objprojectModel));
        }
        public ActionResult MoveSubGroupOrAccountHead(AccountHeadModel accountHeadModel)
        {
            bool      isFederation = string.IsNullOrEmpty(Request.Form.Get("isFederation")) ? true : Convert.ToBoolean(Request.Form.Get("isFederation"));
            ResultDto result       = new ResultDto();

            accountHeadModel.UserID     = 1;
            accountHeadModel.StatusID   = 1;
            accountHeadModel.ParentAHID = accountHeadModel.ParentMoveAHID;
            AccountHeadDto accountHeadDto = AutoMapperEntityConfiguration.Cast <AccountHeadDto>(accountHeadModel);

            result = _accountHeadService.MoveAccountHead(accountHeadDto);
            ViewBag.IsFederation   = isFederation;
            TempData["SuccessMsg"] = result;
            if (isFederation)
            {
                return(RedirectToAction("AccountTree"));
            }
            else
            {
                return(RedirectToAction("GroupAccountTree"));
            }
        }
Beispiel #26
0
        public ActionResult CreateLoanPurpose(LoanPurposeModel objLoanPurpose)
        {
            var resultDto = new ResultDto();

            if (ModelState.IsValid)
            {
                var loanPurposeDto = Mapper.Map <LoanPurposeModel, LoanPurposeDto>(objLoanPurpose);

                loanPurposeDto.UserID = UserInfo.UserID;
                if (loanPurposeDto.LoanPurposeID == 0)
                {
                    resultDto = _loanpurposeService.Insert(loanPurposeDto);
                }
                else
                {
                    resultDto = _loanpurposeService.Update(loanPurposeDto);
                }
                if (resultDto.ObjectId > 0)
                {
                    loanPurposeDto       = _loanpurposeService.GetByID(resultDto.ObjectId);
                    objLoanPurpose       = AutoMapperEntityConfiguration.Cast <LoanPurposeModel>(loanPurposeDto);
                    resultDto.ObjectCode = loanPurposeDto.LoanPurposeCode;
                }
            }

            //SelectList loanpurpose = GetDropDownListByMasterCode(Enums.RefMasterCodes.LOAN_PURPOSE_TYPE);
            //ViewBag.LoanPurpose = loanpurpose;

            List <SelectListDto> Projects = _projectService.GetProjectSelectList();
            SelectList           lst      = new SelectList(Projects, "ID", "Text");

            ViewBag.Projects = lst;


            ViewBag.Result = resultDto;

            return(View(objLoanPurpose));
        }
 public FederationGeneralPaymentsService()
 {
     _dbContext = new MFISDBContext();
     AutoMapperEntityConfiguration.Configure();
     _commonService = new CommonService();
 }
Beispiel #28
0
 public OrganizationService()
 {
     _dbContext = new MFISDBContext();
     AutoMapperEntityConfiguration.Configure();
 }
 public GroupGeneralReceiptService()
 {
     _dbContext = new MFISDBContext();
     AutoMapperEntityConfiguration.Configure();
     _commonService = new CommonService();
 }
 public ContraEntryService()
 {
     _dbContext = new MFISDBContext();
     AutoMapperEntityConfiguration.Configure();
 }