示例#1
0
        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;
            }
        }
示例#2
0
        private void RightMenu()
        {
            ToolStripMenuItem tsmiR;
            ToolStripMenuItem tsmi;

            cms.Items.Add("查看审核详情", null, delegate(object sender, EventArgs e)
            {
                if (this.dgvMain.CurrentRow.Index < 0)
                {
                    return;
                }
                PurchaseUnitShow ps = this.dgvMain.CurrentRow.DataBoundItem as PurchaseUnitShow;
                PurchaseUnit pu     = this._listPurchaseUnit.Where(r => r.Id == ps.Id).FirstOrDefault();
                if (pu == null)
                {
                    return;
                }
                Forms.Approval.FormApprovalFlowCenter form = new Forms.Approval.FormApprovalFlowCenter(null, pu.FlowID, false);
                form.ShowDialog();
            });
            cms.Items.Add("-");

            tsmiR      = new ToolStripMenuItem("资质查看");
            tsmiR.Name = "资质查看";
            cms.Items.Add(tsmiR);
            cms.Items.Add("-");
            #region 资质查看
            tsmi = new ToolStripMenuItem("GSP证书", null, delegate(object sender, EventArgs e) { this.GetResource(0); });
            tsmiR.DropDownItems.Add(tsmi);
            tsmi = new ToolStripMenuItem("GMP证书", null, delegate(object sender, EventArgs e) { this.GetResource(1); });
            tsmiR.DropDownItems.Add(tsmi);
            tsmi = new ToolStripMenuItem("药品生产许可证", null, delegate(object sender, EventArgs e) { this.GetResource(2); });
            tsmiR.DropDownItems.Add(tsmi);
            tsmi = new ToolStripMenuItem("营业执照", null, delegate(object sender, EventArgs e) { this.GetResource(3); });
            tsmiR.DropDownItems.Add(tsmi);

            tsmi = new ToolStripMenuItem("器械生产许可证", null, delegate(object sender, EventArgs e) { this.GetResource(4); });
            tsmiR.DropDownItems.Add(tsmi);

            tsmi = new ToolStripMenuItem("器械经营许可证", null, delegate(object sender, EventArgs e) { this.GetResource(5); });
            tsmiR.DropDownItems.Add(tsmi);

            tsmi = new ToolStripMenuItem("组织机构代码证", null, delegate(object sender, EventArgs e) { this.GetResource(6); });
            tsmiR.DropDownItems.Add(tsmi);

            tsmi = new ToolStripMenuItem("卫生许可证", null, delegate(object sender, EventArgs e) { this.GetResource(7); });
            tsmiR.DropDownItems.Add(tsmi);

            tsmi = new ToolStripMenuItem("事业单位法人证书", null, delegate(object sender, EventArgs e) { this.GetResource(8); });
            tsmiR.DropDownItems.Add(tsmi);

            tsmi = new ToolStripMenuItem("税务登记证", null, delegate(object sender, EventArgs e) { this.GetResource(9); });
            tsmiR.DropDownItems.Add(tsmi);

            tsmi = new ToolStripMenuItem("食品流通许可证", null, delegate(object sender, EventArgs e) { this.GetResource(10); });
            tsmiR.DropDownItems.Add(tsmi);

            tsmi = new ToolStripMenuItem("品种许可范围", null, delegate(object sender, EventArgs e) { this.GetResource(11); });
            tsmiR.DropDownItems.Add(tsmi);

            tsmi = new ToolStripMenuItem("医疗机构执业许可证", null, delegate(object sender, EventArgs e) { this.GetResource(12); });
            tsmiR.DropDownItems.Add(tsmi);
            #endregion
            cms.Items.Add("查看购货单位信息", null, delegate(object sender, EventArgs e)
            {
                PurchaseUnitShow ps = this.dgvMain.SelectedRows[0].DataBoundItem as PurchaseUnitShow;
                PurchaseUnit pu     = this.PharmacyDatabaseService.GetPurchaseUnit(out msg, ps.Id);
                if (pu == null)
                {
                    return;
                }
                UserControls.ucPurchaseUnit us = new UserControls.ucPurchaseUnit(pu, false);
                Form f          = new Form();
                f.Text          = pu.Name;
                f.AutoSize      = true;
                f.AutoSizeMode  = System.Windows.Forms.AutoSizeMode.GrowAndShrink;
                f.StartPosition = FormStartPosition.CenterScreen;
                Panel p         = new Panel();
                p.AutoSize      = true;
                p.Controls.Add(us);
                f.Controls.Add(p);
                f.ShowDialog();
            });

            cms.Items.Add("-");
            cms.Items.Add("导出EXCEL表格", null, toolStripButton2_Click);
            cms.Items.Add("-");
            cms.Items.Add("刷新列表", null, this.toolStripButton1_Click);
        }