private void button2_Click(object sender, EventArgs e) { if (new DasherStation.transport.FormHelper().inputCheck(groupBox1)) { EquipmentInformation entity = new EquipmentInformation(); entity.id = this.id; entity.no = this.txtNo.Text.Trim(); if (cbxName.SelectedValue != null) { entity.enId = long.Parse(cbxName.SelectedValue.ToString()); } if (cbxModel.SelectedValue != null) { entity.emId = long.Parse(cbxModel.SelectedValue.ToString()); } if (this.txtCount.Text.Trim() != "") { entity.count = long.Parse(txtCount.Text); } entity.registrationMark = this.txtRMark.Text; entity.beginUseTime = dtpBegin.Value; if (cbxDId.SelectedValue != null) { entity.dId = long.Parse(cbxDId.SelectedValue.ToString()); } entity.installationPosition = this.txtPosition.Text; if (this.txtSumPower.Text.Trim() != "") { entity.sumPower = decimal.Parse(this.txtSumPower.Text); } entity.addMethod = this.txtAddMethod.Text; if (this.txtPValue.Text.Trim() != "") { entity.primaryValue = decimal.Parse(this.txtPValue.Text); } if (this.txtRemainsValue.Text.Trim() != "") { entity.remainsValue = decimal.Parse(this.txtRemainsValue.Text); } if (this.txtDYear.Text.Trim() != "") { entity.depreciationYear = long.Parse(this.txtDYear.Text); } entity.factoryNo = this.txtFactoryNo.Text; entity.produceDate = this.dtpProduce.Value; entity.workMan = this.txtWorkman.Text; entity.contactMan = this.txtContackman.Text; entity.contactMethod = this.txtContactMethod.Text; entity.postCode = this.txtZip.Text; entity.producer = this.txtProducer.Text; if (this.cbxDocument.SelectedValue != null) { entity.dId2 = long.Parse(this.cbxDocument.SelectedValue.ToString()); } entity.factoryAddress = this.txtAdress.Text; if (this.cbx_mark.Text != "") { entity.mark = this.cbx_mark.SelectedValue.ToString(); } new EquipmentInfoLogic().Edit(entity); //DasherStation.HumanResource.CommUI.MsgOK(); this.DialogResult = DialogResult.OK; this.Close(); } }
partial void UpdateEquipmentInformation(EquipmentInformation instance);
partial void DeleteEquipmentInformation(EquipmentInformation instance);
partial void InsertEquipmentInformation(EquipmentInformation instance);