Esempio n. 1
0
        public async Task <IHttpActionResult> EditForUnitNumber(string unitNumber, Models.SealUseUnitInfor.SealUseUnitInforViewModel model)
        {
            if (ModelState.IsValid)
            {
                SealSystem.Models.SealUseUnitInfor data = new SealSystem.Models.SealUseUnitInfor();
                data.EnglishName             = model.EnglishName;
                data.EnterpriseDocumentsType = model.EnterpriseDocumentsType;
                data.EthnicMinoritiesName    = model.EthnicMinoritiesName;
                data.IdNumber           = model.IdNumber;
                data.IdNumbers          = model.IdNumbers;
                data.LegelPerson        = model.LegelPerson;
                data.Name               = model.Name;
                data.Note               = model.Note;
                data.Phone              = model.Phone;
                data.TheUnitType        = model.TheUnitType;
                data.UnitAddress        = model.UnitAddress;
                data.UnitClassification = model.UnitClassification;
                data.UnitNumber         = model.UnitNumber;
                await BLL.SealUseUnitInforBLL.EditForUnitNumber(unitNumber, data);

                return(Ok(new Models.ResponseData()
                {
                    code = 200, Data = "修改成功"
                }));
            }
            else
            {
                return(Ok(new Models.ResponseData()
                {
                    code = 200, ErrorMessage = "修改失败"
                }));
            }
        }
Esempio n. 2
0
        public async Task <Models.SealUseUnitInfor.SealUseUnitInforViewModel> GetOneForName(string name)
        {
            var model = await BLL.SealUseUnitInforBLL.GetOneForName(name);

            var data = new Models.SealUseUnitInfor.SealUseUnitInforViewModel();

            data.Id                      = model.Id;
            data.CreateTime              = model.CreateTime;
            data.EnglishName             = model.EnglishName;
            data.EnterpriseDocumentsType = model.EnterpriseDocumentsType;
            data.EthnicMinoritiesName    = model.EthnicMinoritiesName;
            data.IdNumber                = model.IdNumber;
            data.IdNumbers               = model.IdNumbers;
            data.LegelPerson             = model.LegelPerson;
            data.Name                    = model.Name;
            data.Note                    = model.Note;
            data.Phone                   = model.Phone;
            data.TheUnitType             = model.TheUnitType;
            data.UnitAddress             = model.UnitAddress;
            data.UnitClassification      = model.UnitClassification;
            data.UnitNumber              = model.UnitNumber;
            return(data);
        }