private void GetDrugInfo() { if (this.dataGridView1.CurrentRow == null) { return; } var d = this.dataGridView1.CurrentRow.DataBoundItem as DrugInfo; var di = this.PharmacyDatabaseService.GetDrugInfo(out msg, d.Id); UI.UserControls.ucGoodsInfo ucControl = new UserControls.ucGoodsInfo(di); Form f = new Form(); f.WindowState = FormWindowState.Normal; f.StartPosition = FormStartPosition.CenterScreen; f.Text = di.ProductGeneralName; f.AutoSize = true; f.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink; Panel p = new Panel(); p.AutoSize = true; p.Controls.Add(ucControl); f.Controls.Add(p); SetControls.SetControlReadonly(f, true); f.ShowDialog(); }
//右键菜单事件 private void GetDrugInfo(int Method) { if (this.dgvMain.SelectedRows.Count <= 0) { return; } var c = this.dgvMain.SelectedRows[0].DataBoundItem as Business.Models.DrugInfoModel; DrugInfo di = this.PharmacyDatabaseService.GetDrugInfo(out msg, c.id); if (di == null) { return; } if (Method == 0) { UI.UserControls.ucGoodsInfo ucControl = new UserControls.ucGoodsInfo(di); Form f = new Form(); f.WindowState = FormWindowState.Normal; f.StartPosition = FormStartPosition.CenterScreen; f.Text = di.ProductGeneralName; f.AutoSize = true; f.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink; Panel p = new Panel(); p.AutoSize = true; p.Controls.Add(ucControl); f.Controls.Add(p); SetControls.SetControlReadonly(f, true); f.ShowDialog(); } if (Method == 1) { Forms.Approval.FormApprovalFlowCenter form = new Forms.Approval.FormApprovalFlowCenter(di, di.FlowID, false); form.ShowDialog(); } if (Method == 2) { MyExcelUtls.DataGridview2Sheet(this.dgvMain, "已锁定品种信息查询结果"); } }
private void button1_Click(object sender, EventArgs e) { using (Forms.BaseDataManage.Form_Photo frm = new Forms.BaseDataManage.Form_Photo(17, this.entity.Id)) { if (this.FSE == FormStatusEnum.Edit) { SetControls.SetControlReadonly(frm, false); frm.ShowDialog(); } else if (this.FSE == FormStatusEnum.New) { MessageBox.Show("请在\"品种质量档案维护\"版块内进行上传图片"); return; } else { SetControls.SetControlReadonly(frm, true); frm.ShowDialog(); } } }
private void GetResource(int i) { bool2String b = this.dataGridView1.SelectedRows[0].DataBoundItem as bool2String; SupplyUnit su = _listSupplyUnit.Where(r => r.Id == b.id).FirstOrDefault(); switch (i) { case 0: FormMedicineBusinessLicense FormMedicineBusinessLicense = new FormMedicineBusinessLicense(su.MedicineBusinessLicenseId, true); SetControls.SetControlReadonly(FormMedicineBusinessLicense, true); FormMedicineBusinessLicense.ShowDialog(); break; case 1: FormGMPLicense FormGMPLiscense = new FormGMPLicense(su.GMPLicenseId, string.Empty, string.Empty, true); SetControls.SetControlReadonly(FormGMPLiscense, true); FormGMPLiscense.ShowDialog(); break; case 2: FormMedicineProductionLicense FormMedicineProductionLicense = new FormMedicineProductionLicense(su.MedicineProductionLicenseId, true); SetControls.SetControlReadonly(FormMedicineProductionLicense, true); FormMedicineProductionLicense.ShowDialog(); break; case 3: FormBusinessLicense FormBusinessLicense = new FormBusinessLicense(su.BusinessLicenseId, string.Empty, string.Empty); SetControls.SetControlReadonly(FormBusinessLicense, true); FormBusinessLicense.ShowDialog(); break; case 4: FormInstrumentsProductionLicense FormInstrumentsProductionLicense = new FormInstrumentsProductionLicense(su.InstrumentsProductionLicenseId, string.Empty, string.Empty, string.Empty); SetControls.SetControlReadonly(FormInstrumentsProductionLicense, true); FormInstrumentsProductionLicense.ShowDialog(); break; case 5: FormInstrumentsBusinessLicense FormInstrumentsBusinessLicense = new FormInstrumentsBusinessLicense(su.InstrumentsBusinessLicenseId, string.Empty, string.Empty, string.Empty, string.Empty, string.Empty); SetControls.SetControlReadonly(FormInstrumentsBusinessLicense, true); FormInstrumentsBusinessLicense.ShowDialog(); break; case 6: FormOrganizationCodeLicense FormOrganizationCodeLicense = new FormOrganizationCodeLicense(su.OrganizationCodeLicenseId, string.Empty, string.Empty); SetControls.SetControlReadonly(FormOrganizationCodeLicense, true); FormOrganizationCodeLicense.ShowDialog(); break; case 7: FormHealthLicense FormHealthLicense = new FormHealthLicense(su.HealthLicenseId, string.Empty, string.Empty, string.Empty); SetControls.SetControlReadonly(FormHealthLicense, true); FormHealthLicense.ShowDialog(); break; case 8: LnstitutionLegalPersonLicense LegalPersonLicense = new LnstitutionLegalPersonLicense(); LegalPersonLicense.Id = su.LnstitutionLegalPersonLicenseId; FormLegalPersonLicense FormLegalPersonLicense = new FormLegalPersonLicense(LegalPersonLicense, string.Empty, string.Empty, string.Empty); SetControls.SetControlReadonly(FormLegalPersonLicense, true); FormLegalPersonLicense.ShowDialog(); break; case 9: FormTaxRegisterLicense FormTaxRegisterLicense = new FormTaxRegisterLicense(su.TaxRegisterLicenseId, string.Empty, string.Empty, string.Empty); SetControls.SetControlReadonly(FormTaxRegisterLicense, true); FormTaxRegisterLicense.ShowDialog(); break; case 10: FormFoodCirculateLicense FormFoodCirculateLicense = new FormFoodCirculateLicense(su.FoodCirculateLicenseId, string.Empty, string.Empty, string.Empty); SetControls.SetControlReadonly(FormFoodCirculateLicense, true); FormFoodCirculateLicense.ShowDialog(); break; case 11: FormGSPLicense FormGSPLicense = new FormGSPLicense(su.GSPLicenseId, string.Empty, string.Empty, string.Empty, string.Empty, string.Empty); SetControls.SetControlReadonly(FormGSPLicense, true); FormGSPLicense.ShowDialog(); break; case 12: MmedicalInstitutionPermit InstitutionPermit = new MmedicalInstitutionPermit(); InstitutionPermit.Id = su.MmedicalInstitutionPermitId; FormMmedicalInstitutionPermit FormMmedicalInstitutionPermit = new FormMmedicalInstitutionPermit(InstitutionPermit, string.Empty, string.Empty, string.Empty, string.Empty); SetControls.SetControlReadonly(FormMmedicalInstitutionPermit, true); FormMmedicalInstitutionPermit.ShowDialog(); break; } }
public void clickGoBack() { SetControls.Click(btnGoBack); }
// Use this for initialization void Start () { setControlMain = this; setControlsInt = 3; ControlesMenu.SetActive (false); PauseMenu.SetActive (true); }
//右键菜单事件 private void GetDrugInfo(int Method) { if (this.dataGridView1.SelectedRows.Count <= 0) { return; } var c = this.dataGridView1.SelectedRows[0].DataBoundItem as Business.Models.DrugInfoModel; DrugInfo di = this.PharmacyDatabaseService.GetDrugInfo(out msg, c.id); if (di == null) { return; } if (Method == 0) { UI.UserControls.ucGoodsInfo ucControl = new UserControls.ucGoodsInfo(di); Form f = new Form(); f.WindowState = FormWindowState.Normal; f.StartPosition = FormStartPosition.CenterScreen; f.Text = di.ProductGeneralName; f.AutoSize = true; f.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink; Panel p = new Panel(); p.AutoSize = true; p.Controls.Add(ucControl); f.Controls.Add(p); SetControls.SetControlReadonly(f, true); f.ShowDialog(); } if (Method == 1) { FormApprovalFlowCenter form = new FormApprovalFlowCenter(di, di.FlowID, false); form.ShowDialog(); } if (Method == 2) { MyExcelUtls.DataGridview2Sheet(this.dataGridView1, "品种信息查询结果"); } if (Method == 3) { var u = this.dataGridView1.SelectedRows[0].DataBoundItem as Business.Models.DrugInfoModel; byte[] b = this.PharmacyDatabaseService.GetUpdateFiles("ApprovalFiles\\9047DBCF-CD15-4904-8786-006A76DD4799").FirstOrDefault().bytes; using (System.IO.FileStream fs = new System.IO.FileStream("File", System.IO.FileMode.OpenOrCreate)) { fs.Write(b, 0, b.Length); fs.Close(); CreateWinWord cww = new CreateWinWord(); cww.d = u; if (cww.CreateWord(fs.Name, u.ProductGeneralName, 2)) { MessageBox.Show(u.ProductGeneralName + ":审批信息表导出成功!"); this.PharmacyDatabaseService.WriteLog(BugsBox.Pharmacy.AppClient.Common.AppClientContext.currentUser.Id, "导出首营信息审批表成功!品种名称:" + di.ProductGeneralName); } else { this.PharmacyDatabaseService.WriteLog(BugsBox.Pharmacy.AppClient.Common.AppClientContext.currentUser.Id, "导出首营信息审批表失败!品种名称:" + di.ProductGeneralName); } fs.Dispose(); } } if (Method == 4) { var u = this.dataGridView1.SelectedRows[0].DataBoundItem as Business.Models.DrugInfoModel; Form_DrugQualityTrace frm = new Form_DrugQualityTrace(u.id, u.ProductGeneralName); frm.ShowDialog(); frm.Dispose(); } }
//public ShopPage navigateShop() //{ // linkShop.click(); // return new ShopPage(BasePage.driver); //} public ContactPage navigateContact() { SetControls.Click(linkContact); return(new ContactPage(BasePage.driver)); }
public void setLastName(String name) { SetControls.Clear(txtSurname); SetControls.EnterText(txtSurname, name); }
public void setFirstName(String name) { SetControls.Clear(txtForename); SetControls.EnterText(txtForename, name); }
public void clickCancel() { SetControls.Click(btnCancel); }
public void clickLogin() { SetControls.Click(btnLogin); }
public void setPassword(string password) { SetControls.EnterText(txtPassword, password); }
public void setUsername(string username) { SetControls.EnterText(txtUsername, username); }
public void setEmail(String email) { SetControls.Clear(txtEmail); SetControls.EnterText(txtEmail, email); }
//navigate functions public HomePage navigateHome() { SetControls.Click(linkHome); return(new HomePage(BasePage.driver)); }
public void setTelephone(String phone) { txtTelephone.Clear(); SetControls.EnterText(txtTelephone, phone); }
public LoginPage navigateLogin() { SetControls.Click(linkLogin); return(new LoginPage(BasePage.driver)); }
public void setMessage(String msg) { txtMessage.Clear(); SetControls.EnterText(txtMessage, msg); }
private void GetResource(int i) { PurchaseUnitShow ps = this.dgvMain.CurrentRow.DataBoundItem as PurchaseUnitShow; PurchaseUnit pu = this._listPurchaseUnit.Where(r => r.Id == ps.Id).FirstOrDefault(); if (pu == null) { return; } switch (i) { case 0: FormMedicineBusinessLicense FormMedicineBusinessLicense = new FormMedicineBusinessLicense(pu.MedicineBusinessLicenseId, true); FormMedicineBusinessLicense.ShowDialog(); break; case 1: FormGMPLicense frm = new FormGMPLicense(pu.GMPLicenseId, string.Empty, string.Empty, true); frm.ShowDialog(); break; case 2: FormMedicineProductionLicense FormMedicineProductionLicense = new FormMedicineProductionLicense(pu.MedicineProductionLicenseId, true); SetControls.SetControlReadonly(FormMedicineProductionLicense, true); FormMedicineProductionLicense.ShowDialog(); break; case 3: FormBusinessLicense FormBusinessLicense = new FormBusinessLicense(pu.BusinessLicenseId, string.Empty, string.Empty); SetControls.SetControlReadonly(FormBusinessLicense, true); FormBusinessLicense.ShowDialog(); break; case 4: FormInstrumentsProductionLicense FormInstrumentsProductionLicense = new FormInstrumentsProductionLicense(pu.InstrumentsProductionLicenseId, string.Empty, string.Empty, string.Empty); SetControls.SetControlReadonly(FormInstrumentsProductionLicense, true); FormInstrumentsProductionLicense.ShowDialog(); break; case 5: FormInstrumentsBusinessLicense FormInstrumentsBusinessLicense = new FormInstrumentsBusinessLicense(pu.InstrumentsBusinessLicenseId, string.Empty, string.Empty, string.Empty, string.Empty, string.Empty); SetControls.SetControlReadonly(FormInstrumentsBusinessLicense, true); FormInstrumentsBusinessLicense.ShowDialog(); break; case 6: FormOrganizationCodeLicense FormOrganizationCodeLicense = new FormOrganizationCodeLicense(pu.OrganizationCodeLicenseId, string.Empty, string.Empty); SetControls.SetControlReadonly(FormOrganizationCodeLicense, true); FormOrganizationCodeLicense.ShowDialog(); break; case 7: FormHealthLicense FormHealthLicense = new FormHealthLicense(pu.HealthLicenseId, string.Empty, string.Empty, string.Empty); SetControls.SetControlReadonly(FormHealthLicense, true); FormHealthLicense.ShowDialog(); break; case 8: LnstitutionLegalPersonLicense LegalPersonLicense = new LnstitutionLegalPersonLicense(); LegalPersonLicense.Id = pu.LnstitutionLegalPersonLicenseId; FormLegalPersonLicense FormLegalPersonLicense = new FormLegalPersonLicense(LegalPersonLicense, string.Empty, string.Empty, string.Empty); SetControls.SetControlReadonly(FormLegalPersonLicense, true); FormLegalPersonLicense.ShowDialog(); break; case 9: FormTaxRegisterLicense FormTaxRegisterLicense = new FormTaxRegisterLicense(pu.TaxRegisterLicenseId, string.Empty, string.Empty, string.Empty); SetControls.SetControlReadonly(FormTaxRegisterLicense, true); FormTaxRegisterLicense.ShowDialog(); break; case 10: FormFoodCirculateLicense FormFoodCirculateLicense = new FormFoodCirculateLicense(pu.FoodCirculateLicenseId, string.Empty, string.Empty, string.Empty); SetControls.SetControlReadonly(FormFoodCirculateLicense, true); FormFoodCirculateLicense.ShowDialog(); break; case 11: FormGSPLicense FormGSPLicense = new FormGSPLicense(pu.GSPLicenseId, string.Empty, string.Empty, string.Empty, string.Empty, string.Empty); SetControls.SetControlReadonly(FormGSPLicense, true); FormGSPLicense.ShowDialog(); break; case 12: MmedicalInstitutionPermit InstitutionPermit = new MmedicalInstitutionPermit(); InstitutionPermit.Id = pu.MmedicalInstitutionPermitId; FormMmedicalInstitutionPermit FormMmedicalInstitutionPermit = new FormMmedicalInstitutionPermit(InstitutionPermit, string.Empty, string.Empty, string.Empty, string.Empty); SetControls.SetControlReadonly(FormMmedicalInstitutionPermit, true); FormMmedicalInstitutionPermit.ShowDialog(); break; } }
private void buttonLicense_Click(object sender, EventArgs e) { if (!ValidateControls(out msg)) { MessageBox.Show("请先填写必要的企业信息,如单位名称,法人,收货地址等!"); return; } Button btnLicense = sender as Button; string legalPerson = txtLegalPerson.Text.Trim(); string name = txtName.Text.Trim(); string address = txtBoxCompanyAddress.Text.Trim(); string qualityCharger = txtBoxQualityCharger.Text.Trim(); string wareHouseAddress = txtReceiveAddress.Text.Trim(); Guid LicenseId = btnLicense.Tag == null ? Guid.Empty : (Guid)btnLicense.Tag; switch (btnLicense.Text) { case "分类控制中心": LicenseId = PurchaseUnit == null ? Guid.Empty : PurchaseUnit.GSPLicenseId; FormGSPLicense frm = new FormGSPLicense(LicenseId, legalPerson, qualityCharger, name, address, wareHouseAddress); SetControls.SetControlReadonly(frm, !this._isEditable); if (frm.ShowDialog() == DialogResult.OK) { btnLicense.Tag = frm._gspLiscenceId; btnLicense.BackColor = Color.LightBlue; } break; case "三证信息": FormBusinessLicense FormBusinessLicense = new FormBusinessLicense(LicenseId, name, address); SetControls.SetControlReadonly(FormBusinessLicense, !this._isEditable); if (FormBusinessLicense.ShowDialog() == DialogResult.OK) { btnLicense.Tag = FormBusinessLicense.BusinessLicense.Id; } break; case "器械生产许可证": FormInstrumentsProductionLicense FormInstrumentsProductionLicense = new FormInstrumentsProductionLicense(LicenseId, legalPerson, address, name); SetControls.SetControlReadonly(FormInstrumentsProductionLicense, !this._isEditable); if (FormInstrumentsProductionLicense.ShowDialog() == DialogResult.OK) { btnLicense.Tag = FormInstrumentsProductionLicense.InstrumentsProductionLicense.Id; } break; case "器械经营许可证": FormInstrumentsBusinessLicense FormInstrumentsBusinessLicense = new FormInstrumentsBusinessLicense(LicenseId, legalPerson, qualityCharger, name, address, wareHouseAddress); SetControls.SetControlReadonly(FormInstrumentsBusinessLicense, !this._isEditable); if (FormInstrumentsBusinessLicense.ShowDialog() == DialogResult.OK) { btnLicense.Tag = FormInstrumentsBusinessLicense.InstrumentsBusinessLicense.Id; } break; case "医疗机构执业许可证": MmedicalInstitutionPermit InstitutionPermit = new MmedicalInstitutionPermit(); InstitutionPermit.Id = LicenseId; FormMmedicalInstitutionPermit FormMmedicalInstitutionPermit = new FormMmedicalInstitutionPermit(InstitutionPermit, name, address, legalPerson, wareHouseAddress); SetControls.SetControlReadonly(FormMmedicalInstitutionPermit, !this._isEditable); if (FormMmedicalInstitutionPermit.ShowDialog() == DialogResult.OK) { btnLicense.Tag = FormMmedicalInstitutionPermit.MmedicalInstitutionPermit.Id; } break; } if (!(btnLicense.Tag == null)) { if (!btnLicense.Tag.Equals(Guid.Empty))// ||!btnLicense.Tag.Equals(Guid.Empty) { btnLicense.BackColor = Color.LightBlue; } else { btnLicense.BackColor = Color.LightGray; } } }