private void buttonOK_Click(object sender, EventArgs e)
        {
            UseWaitCursor = true;
            Application.DoEvents();

            try
            {
                if (spotHandelDesisionSixtyDay == null)
                    spotHandelDesisionSixtyDay = new SpotHandelDesisionSixtyDay();

                GetEntity(spotHandelDesisionSixtyDay);

                Company company = new Company
                {
                    CompanyName = HandleComp.Text,
                };
                InvokeUtil.SystemService.UpdateCompanyByName(company);

                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(spotHandelDesisionSixtyDay);
                CloseWindow();
            }
            catch (Exception ex)
            {
                CommonInvoke.ErrorMessageBox(ex);
            }

            UseWaitCursor = false;
        }
Esempio n. 2
0
        /// <summary>
        /// 根据参数更新工作人员
        /// </summary>
        /// <param name="officersName">姓名</param>
        /// <param name="officers">工作人员</param>
        internal void UpdateOfficersByArgs(Officers officers)
        {
            if (officers.OfficersName == "")
                return;

            Officers databaseOfficers = null;

            SelectSqlSection section = DB.Select(DataBases.Officers).Where(DataBases.Officers.OfficersName == officers.OfficersName);
            if (officers.CID != "" && officers.OfficersName != "")
                section.Where(DataBases.Officers.CID == officers.CID);
            else if (officers.Position != "" && officers.OfficersName != "")
                section.Where(DataBases.Officers.Position == officers.Position);

            using (IDataReader reader = section.ToDataReader())
            {
                if (reader.Read())
                {
                    databaseOfficers = ReadRow(reader);
                }
            }

            if (databaseOfficers != null)
            {
                if (officers.CID != "")
                    databaseOfficers.CID = officers.CID;

                if (officers.OfficersName != "")
                    databaseOfficers.OfficersName = officers.OfficersName;

                if (officers.Position != "")
                    databaseOfficers.Position = officers.Position;

                if (officers.Unit != "")
                    databaseOfficers.Unit = officers.Unit;

                databaseOfficers.SystemService = this.SystemService;
                databaseOfficers.SQLtransaction = this.SQLtransaction;
                databaseOfficers.Update();
            }
            else
            {
                officers.SystemService = this.SystemService;
                officers.SQLtransaction = this.SQLtransaction;
                officers.Update();
            }
        }
Esempio n. 3
0
        private void SaveData()
        {
            if (reformReView == null)
            {
                reformReView = new ReformReView();
                reformReView.FilePath = Utility.GetFileSavePath() + Utility.BuilderFileName();
            }

            GetEntity(reformReView);

            Company company = new Company
            {
                CompanyName = ReviewCompany.Text,
            };
            InvokeUtil.SystemService.UpdateCompanyByName(company);

            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(reformReView);
        }
Esempio n. 4
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);
        }
Esempio n. 5
0
        private void SaveData()
        {
            if (hearingNotice == null)
            {
                hearingNotice = new HearingNotice();

                hearingNotice.FilePath = Utility.GetFileSavePath() + Utility.BuilderFileName();
            }
            GetEntity(hearingNotice);

            Officers officer1 = new Officers { OfficersName = HearName1.Text, Position = HearJob1.Text };
            InvokeUtil.SystemService.UpdateOfficersByArgs(officer1);

            Officers officer2 = new Officers { OfficersName = HearName2.Text, Position = HearJob2.Text };
            InvokeUtil.SystemService.UpdateOfficersByArgs(officer1);

            Officers officer3 = new Officers { OfficersName = CompereName.Text, Position = CompereJob.Text };
            InvokeUtil.SystemService.UpdateOfficersByArgs(officer3);

            Officers officer4 = new Officers { OfficersName = SecretaryName.Text, Position = SecretaryJob.Text };
            InvokeUtil.SystemService.UpdateOfficersByArgs(officer4);

            if (Informant.SelectedValue != null)
            {
                SearchWord searchWord = Informant.SelectedValue as SearchWord;
                Company company = searchWord.ToObject<Company>();
                hearingNotice.CompanyID = company.CompanyID;
            }

            InvokeUtil.SystemService.EntityUpdate(hearingNotice);
        }
Esempio n. 6
0
        private void SaveData()
        {
            if (interrogationRecord == null)
            {
                interrogationRecord = new InterrogationRecord();
                interrogationRecord.FilePath = Utility.GetFileSavePath() + Utility.BuilderFileName();
            }

            ToTime.Value = DateTime.Parse(BeganTime.Value.ToString("yyyy-MM-dd") + ToTime.Value.ToString(" HH:mm:ss"));

            GetEntity(interrogationRecord);

            NaturalPerson naturalPerson = new NaturalPerson
            {
                PersonName = BeAskEPeopleName.Text,
                Sex = BeAskEPeopleSex.Text,
                Age = BeAskEPeopleAge.Text,
                IDcard = BeAskEPeopleID.Text,
                CompanyName = BeAskEPeopleCompanyName.Text,
                Address = BeAskEPeopleAddress.Text,
                CompanyTel = BeAskEPeoplePhone.Text
            };
            InvokeUtil.SystemService.UpdateNaturalPersonByArgs(naturalPerson);
            Officers officer1 = new Officers { OfficersName = AskUserName.Text, Unit = AskUserCompanyName.Text };
            InvokeUtil.SystemService.UpdateOfficersByArgs(officer1);
            Officers officer2 = new Officers { OfficersName = RecordUserName.Text };
            InvokeUtil.SystemService.UpdateOfficersByArgs(officer2);

            List<AskAndAnswer> Answers = questionContainer.GetItems();
            interrogationRecord.Items.Clear();
            foreach (AskAndAnswer answer in Answers)
            {
                interrogationRecord.Items.Add(new EnquireQuestionItem { Anwser = answer.Answer, Question = answer.Question });
            }
            InvokeUtil.SystemService.EntityUpdate(interrogationRecord);
            //InvokeUtil.SystemService.EntityUpdate(enquireQuestion);
        }
Esempio n. 7
0
        private void SaveData()
        {
            if (orderDeadlineReform == null)
            {
                orderDeadlineReform = new OrderDeadlineReform();
                orderDeadlineReform.FilePath = Utility.GetFileSavePath() + Utility.BuilderFileName();
            }

            GetEntity(orderDeadlineReform);

            Company company = new Company
            {
                CompanyName = OrderCompany.Text,
            };
            InvokeUtil.SystemService.UpdateCompanyByName(company);

            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(orderDeadlineReform);
        }
Esempio n. 8
0
        private void SaveData()
        {
            if (inCaseOfTable == null)
            {
                inCaseOfTable = new InCaseOfTable();

                inCaseOfTable.FilePath = Utility.GetFileSavePath() + Utility.BuilderFileName();
            }
            GetEntity(inCaseOfTable);
            Company company = new Company
            {
                CompanyName = PutOnRecordPeopleName.Text,
                JuridicalPerson = PutOnRecordFName.Text,
                CompanyAddress = PutOnRecordPeopleAddress.Text
            };
            Officers officer1 = new Officers { OfficersName = UndertakerUserName1.Text };
            InvokeUtil.SystemService.UpdateOfficersByArgs(officer1);
            Officers officer2 = new Officers { OfficersName = UndertakerUserName2.Text };
            InvokeUtil.SystemService.UpdateOfficersByArgs(officer2);

            InvokeUtil.SystemService.EntityUpdate(inCaseOfTable);
        }
Esempio n. 9
0
        private void SaveData()
        {
            if (spotHandelDesision == null)
            {
                spotHandelDesision = new SpotHandelDesision();

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

            GetEntity(spotHandelDesision);

            Company company = new Company
            {
                CompanyName = CompanyName.Text,
            };
            InvokeUtil.SystemService.UpdateCompanyByName(company);

            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(spotHandelDesision);
        }
Esempio n. 10
0
        private void SaveData()
        {
            if (sampling == null)
            {
                sampling = new Sampling();
                sampling.FilePath = Utility.GetFileSavePath() + Utility.BuilderFileName();
            }

            sampling.Items.Clear();
            foreach (DataGridViewRow row in SamplingContentGridViewItems.Rows)
            {
                if (row.Tag != null)
                    sampling.Items.Add(row.Tag as SamplingContent);
            }

            ToTime.Value = DateTime.Parse(BeganTime.Value.ToString("yyyy-MM-dd") + ToTime.Value.ToString(" HH:mm:ss"));

            GetEntity(sampling);

            Company company = new Company
            {
                CompanyName = FieldECompanyName.Text,
                CompanyAddress = FieldEAddress.Text,
                Mobile = FieldEPeoplePhone.Text,
                CompanyPost = FieldEPeopleZio.Text
            };
            InvokeUtil.SystemService.UpdateCompanyByName(company);
            NaturalPerson naturalPerson = new NaturalPerson
            {
                PersonName = FieldEPeopleName.Text,
                CompanyName = FieldECompanyName.Text,
                CompanyAddress = FieldEAddress.Text,
                CompanyTel = FieldEPeoplePhone.Text,
            };
            InvokeUtil.SystemService.UpdateNaturalPersonByArgs(naturalPerson);
            NaturalPerson naturalPerson1 = new NaturalPerson
            {
                PersonName = WitnesEPeopleName1.Text
            };
            InvokeUtil.SystemService.UpdateNaturalPersonByArgs(naturalPerson1);
            NaturalPerson naturalPerson2 = new NaturalPerson
            {
                PersonName = WitnesEPeopleName2.Text
            };
            InvokeUtil.SystemService.UpdateNaturalPersonByArgs(naturalPerson2);
            Officers officer1 = new Officers { OfficersName = ExecUserName1.Text };
            InvokeUtil.SystemService.UpdateOfficersByArgs(officer1);
            Officers officer2 = new Officers { OfficersName = ExecUserName1.Text };
            InvokeUtil.SystemService.UpdateOfficersByArgs(officer2);

            InvokeUtil.SystemService.EntityUpdate(sampling);
        }
Esempio n. 11
0
        private void SaveData()
        {
            if (putDown == null)
            {
                putDown = new PutDown();

                putDown.FilePath = Utility.GetFileSavePath() + Utility.BuilderFileName();
            }
            GetEntity(putDown);

            Officers officer1 = new Officers { OfficersName = Investigador1.Text, Position = InvestigadorIDC1.Text };
            InvokeUtil.SystemService.UpdateOfficersByArgs(officer1);
            Officers officer2 = new Officers { OfficersName = Investigador2.Text, Position = InvestigadorIDC2.Text };
            InvokeUtil.SystemService.UpdateOfficersByArgs(officer2);

            Company company = new Company
            {
                CompanyName = ProposerCompany.Text,
                CompanyAddress = ProposerAddress.Text,
                JuridicalPerson = LegalRepre.Text,
                JuridicalPersonSex = LegalRepreSex.Text,
                JuridicalPersonAge = LegalRepreAge.Text,
            };
            InvokeUtil.SystemService.UpdateCompanyByName(company);

            Lawyer legalRepreAgent1 = new Lawyer
            {
                LawyerName = LegalRepreAgent1.Text,
                Sex = LegalRepreAgentSex1.Text,
                Age = LegalRepreAgentAge1.Text,
                Job = LegalRepreAgentJob1.Text
            };
            InvokeUtil.SystemService.UpdateLawyer(legalRepreAgent1);

            Lawyer legalRepreAgent2 = new Lawyer
            {
                LawyerName = LegalRepreAgent2.Text,
                Sex = LegalRepreAgentSex2.Text,
                Age = LegalRepreAgentAge2.Text,
                Job = LegalRepreAgentJob2.Text
            };
            InvokeUtil.SystemService.UpdateLawyer(legalRepreAgent2);

            NaturalPerson person = new NaturalPerson
            {
                PersonName = Proposer.Text,
                Sex = ProposerSex.Text,
                Age = ProposerAge.Text,
                Job = ProposerJob.Text
            };
            InvokeUtil.SystemService.UpdateNaturalPersonByArgs(person);

            Lawyer proposerAgent1 = new Lawyer
            {
                LawyerName = ProposerAgent1.Text,
                Sex = ProposerAgentSex1.Text,
                Age = ProposerAgentAge1.Text,
                Job = ProposerAgentJob1.Text
            };
            InvokeUtil.SystemService.UpdateLawyer(proposerAgent1);

            Lawyer proposerAgent2 = new Lawyer
            {
                LawyerName = ProposerAgen2.Text,
                Sex = ProposerAgentSex2.Text,
                Age = ProposerAgentAge2.Text,
                Job = ProposerAgentJob2.Text
            };
            InvokeUtil.SystemService.UpdateLawyer(proposerAgent2);

            InvokeUtil.SystemService.EntityUpdate(putDown);
        }
Esempio n. 12
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);
        }