Пример #1
0
        /// <summary>
        /// 更新检查地点
        /// </summary>
        /// <param name="checkPlace">检查地点</param>
        internal void UpdateCheckPlace(CheckPlace checkPlace)
        {
            if (checkPlace.CheckContent == "")
                return;

            CheckPlace databaseCheckPlace = null;
            using (IDataReader reader = DB.Select(DataBases.CheckPlace).Where(DataBases.CheckPlace.CheckContent == checkPlace.CheckContent).ToDataReader())
            {
                if (reader.Read())
                {
                    databaseCheckPlace = ReadRow(reader);
                }
            }

            if (databaseCheckPlace != null)
            {
                databaseCheckPlace.CheckContent = checkPlace.CheckContent;
                databaseCheckPlace.SystemService = this.SystemService;
                databaseCheckPlace.SQLtransaction = this.SQLtransaction;
                databaseCheckPlace.Update();
            }
            else
            {
                checkPlace.SystemService = this.SystemService;
                checkPlace.SQLtransaction = this.SQLtransaction;
                checkPlace.Update();
            }
        }
Пример #2
0
        private void SaveData()
        {
            if (appraisalEntrust == null)
            {
                appraisalEntrust = new AppraisalEntrust();

                appraisalEntrust.FilePath = Utility.GetFileSavePath() + Utility.BuilderFileName();
            }
            SamplingID.Text = InvokeUtil.SystemService.GetSamplingID(SamplingID.Text.Trim()).ToString();
            GetEntity(appraisalEntrust);

            CheckPlace checkPlace = new CheckPlace
            {
                CheckContent = AppraisalUnit.Text,
            };
            InvokeUtil.SystemService.UpdateCheckPlace(checkPlace);
            Officers officer1 = new Officers { OfficersName = ContactUserName.Text };
            InvokeUtil.SystemService.UpdateOfficersByArgs(officer1);

            InvokeUtil.SystemService.EntityUpdate(appraisalEntrust);
        }
Пример #3
0
        private void SaveData()
        {
            if (spotCheck == null) {
                spotCheck = new SpotCheck();

                spotCheck.FilePath = Utility.GetFileSavePath() + Utility.BuilderFileName();
            }

            GetEntity(spotCheck);

            Company company = new Company
            {
                CompanyName = CompanyName.Text,
                CompanyAddress = CompanyAddress.Text,
                JuridicalPerson = JuridicalName.Text,
                JuridicalPersonJob = JuridicalJob.Text,
                Mobile = JuridicalTel.Text
            };
            InvokeUtil.SystemService.UpdateCompanyByName(company);

            CheckPlace checkPlace = new CheckPlace { CheckContent = CheckAddress.Text };
            InvokeUtil.SystemService.UpdateCheckPlace(checkPlace);

            Officers officer1 = new Officers { OfficersName = OfficerName1.Text, CID = CID1.Text };
            InvokeUtil.SystemService.UpdateOfficersByArgs(officer1);

            Officers officer2 = new Officers { OfficersName = OfficerName2.Text, CID = CID2.Text };
            InvokeUtil.SystemService.UpdateOfficersByArgs(officer2);

            InvokeUtil.SystemService.EntityUpdate(spotCheck);
        }