Beispiel #1
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()));
        }
Beispiel #2
0
        public ActionResult UpdateOfficialReceipt(string ORNumber, string isFinalize)
        {
            Mapper.CreateMap <Models.OfficialReceipt, BusinessObjects.OfficialReceipt>();
            List <Dictionary <string, object> > session = (List <Dictionary <string, object> >)Session["loginDetails"];
            string UserCode = session[0]["Code"].ToString();

            BusinessObjects.UserAccount     UserAccount          = DTSecurityservice.getUserAccountbyCode(UserCode);
            BusinessObjects.OfficialReceipt OfficialReceiptModel = new BusinessObjects.OfficialReceipt();
            OfficialReceiptModel.UserID         = UserAccount.ID;
            OfficialReceiptModel.OrganizationID = UserAccount.OrganizationID;
            OfficialReceiptModel.ORNumber       = ORNumber;
            return(Content(service.UpdateOfficialReceipt(OfficialReceiptModel, isFinalize).ToString()));
        }