Esempio n. 1
0
        public IActionResult GetPmcInfo(int sid, int tid)
        {
            DataAccess.TASM_SUPPORT_HIS_Da manager = new DataAccess.TASM_SUPPORT_HIS_Da();
            HisPmcModel model = manager.SelectHisPmc(sid, tid);

            if (model == null)
            {
                return(FailMessage("未创建"));
            }
            return(SuccessResult(model));
        }
Esempio n. 2
0
        public IActionResult PmcUpdate(HisPmcModel info)
        {
            TASM_SUPPORT_PMC_Da pmc = new TASM_SUPPORT_PMC_Da();

            TASM_SUPPORT_HIS_Da his = new TASM_SUPPORT_HIS_Da();

            var hisModel = his.SelectBySidType(info.SID, 2);

            pmc.Db.BeginTran();

            hisModel.NEXT_USER = int.Parse(info.NEXT_USER);

            if (his.Db.Updateable(hisModel).ExecuteCommand() < 1)
            {
                pmc.Db.RollbackTran();
                return(FailMessage());
            }

            TASM_SUPPORT_PMC model = new TASM_SUPPORT_PMC()
            {
                BOOKNO    = info.BOOKNO,
                CONSIGNEE = info.CONSIGNEE,
                ID        = info.TID,
                DELIVERY  = DateTime.Parse(info.DELIVERY),
                SENDDATE  = DateTime.Parse(info.SENDDATE),
                SENDNO    = info.SENDNO,
                REMARKS   = info.REMARKS
            };


            if (pmc.Db.Updateable(model).ExecuteCommand() < 1)
            {
                pmc.Db.RollbackTran();
                return(FailMessage());
            }

            pmc.Db.CommitTran();

            return(SuccessMessage());
        }