示例#1
0
        public LMS.Models.OfficialReceiptModel FetchAccountInfo(string UserCode)
        {
            LMS.Models.OfficialReceiptModel     OfficialReceiptModel = new LMS.Models.OfficialReceiptModel();
            List <Dictionary <string, object> > session = (List <Dictionary <string, object> >)Session["loginDetails"];

            if (session == null)
            {
                UserCode = "admin";
            }
            else
            {
                UserCode = session[0]["Code"].ToString();
            }
            Mapper.CreateMap <BusinessObjects.PaymentMode, Models.PaymentMode>();
            Mapper.CreateMap <BusinessObjects.Bank, Models.Bank>();
            Mapper.CreateMap <BusinessObjects.UserAccount, Models.DevelopmentTools.UserAccount>();
            IEnumerable <LMS.Models.PaymentMode> PaymentMode = Mapper.Map <IEnumerable <BusinessObjects.PaymentMode>, IEnumerable <Models.PaymentMode> >(service.getPaymentMode());
            IEnumerable <LMS.Models.Bank>        Bank        = Mapper.Map <IEnumerable <BusinessObjects.Bank>, IEnumerable <Models.Bank> >(service.getBank());

            LMS.Models.DevelopmentTools.UserAccount UserAccount = Mapper.Map <BusinessObjects.UserAccount, LMS.Models.DevelopmentTools.UserAccount>(DTSecurityservice.getUserAccountbyCode(UserCode));
            OfficialReceiptModel.PaymentMode = PaymentMode;
            OfficialReceiptModel.Bank        = Bank;
            OfficialReceiptModel.UserAccount = UserAccount;
            LMS.Models.OfficialReceipt OfficialReceipt = new Models.OfficialReceipt();
            OfficialReceipt.ORDate               = service.getServerDate();
            OfficialReceipt.AmountDue            = "0.00"; OfficialReceipt.AmountReceived = "0.00"; OfficialReceipt.PIPDue = "0.00"; OfficialReceipt.GIBCODue = "0.00"; OfficialReceipt.RFCDue = "0.00"; OfficialReceipt.PPD = "0.00";
            OfficialReceipt.AccelerationDiscount = "0.00"; OfficialReceipt.PenaltyWaived = "0.00"; OfficialReceipt.PromptPaymentDiscount = "0.00"; OfficialReceipt.TotalDiscount = "0.00"; OfficialReceipt.PIP = "0.00";
            OfficialReceipt.GIBCO = "0.00"; OfficialReceipt.RFC = "0.00"; OfficialReceipt.TotalRFC = "0.00";
            OfficialReceiptModel.OfficialReceipt = OfficialReceipt;
            return(OfficialReceiptModel);
        }
示例#2
0
        public ActionResult SubmitOfficialReceipt(Models.OfficialReceiptModel ORModel)
        {
            Mapper.CreateMap <Models.OfficialReceipt, BusinessObjects.OfficialReceipt>();
            List <Dictionary <string, object> > session = (List <Dictionary <string, object> >)Session["loginDetails"];
            string UserCode = session[0]["Code"].ToString();

            LMS.Models.DevelopmentTools.UserAccount UserAccount          = Mapper.Map <BusinessObjects.UserAccount, LMS.Models.DevelopmentTools.UserAccount>(DTSecurityservice.getUserAccountbyCode(UserCode));
            BusinessObjects.OfficialReceipt         OfficialReceiptModel = Mapper.Map <Models.OfficialReceipt, BusinessObjects.OfficialReceipt>(ORModel.OfficialReceipt);
            OfficialReceiptModel.UserID         = UserAccount.ID;
            OfficialReceiptModel.OrganizationID = UserAccount.OrganizationID;
            return(Content(service.SubmitOfficialReceipt(OfficialReceiptModel).ToString()));
        }