public DrugMaintainRecordDetails()
        {
            InitializeComponent();
            this.dataGridView1.RowPostPaint += delegate(object o, DataGridViewRowPostPaintEventArgs ex) { DataGridViewOperator.SetRowNumber((DataGridView)o, ex); };
            allUser = this.PharmacyDatabaseService.AllUsers(out msg).ToList();

            this.dataGridView1.CellMouseClick += (sender, e) =>
            {
                cms.DrugId          = Guid.Empty;
                cms.DrugInventoryId = Guid.Empty;

                if (e.RowIndex < 0 || e.ColumnIndex < 0)
                {
                    return;
                }
                var c = this.dataGridView1.Rows[e.RowIndex].DataBoundItem as DrugMaintainRecordDetail;
                if (cms != null)
                {
                    cms.DrugInventoryId = c.DrugInventoryRecordId;
                }
            };

            cms = new BaseForm.BasicInfoRightMenu(this.dataGridView1);
            cms.InsertDrugBasicInfo();
        }
Example #2
0
        public Form_WarningListShow(List <Business.Models.QualityFilesWarningModel> ListModel)
        {
            InitializeComponent();

            this.dataGridView1.AllowUserToAddRows = false;

            BaseForm.BasicInfoRightMenu cms = new BaseForm.BasicInfoRightMenu(this.dataGridView1);

            this.dataGridView1.RowPostPaint       += delegate(object o, DataGridViewRowPostPaintEventArgs ex) { DataGridViewOperator.SetRowNumber((DataGridView)o, ex); };
            this.dataGridView1.ReadOnly            = true;
            this.dataGridView1.AutoSizeColumnsMode = DataGridViewAutoSizeColumnsMode.AllCells;
            ListModel = ListModel.OrderBy(r => r.QualityFileWarningTypeValue).ThenBy(r => r.Name).ToList();

            var c = from i in ListModel
                    select new QualityModel
            {
                Id = i.Id,
                QualityFileWarningTypeValue = i.QualityFileWarningTypeValue,
                Name                  = i.Name,
                WarningDate           = i.WarningDate,
                WarningDateSetUpMonth = i.WarningDateSetUpMonth,
                WarningType           = ((Business.Models.QualityFileWarningType)i.QualityFileWarningTypeValue).ToString()
            };

            this.dataGridView1.DataSource = new BindingCollection <QualityModel>(c.ToList());

            this.dataGridView1.Columns["Id"].Visible = false;
            this.dataGridView1.Columns["QualityFileWarningTypeValue"].Visible = false;
        }
Example #3
0
        public SignDrugAsSpecial()
        {
            InitializeComponent();

            this.toolStripComboBox1.SelectedIndex = 0;
            this.toolStripComboBox2.SelectedIndex = this.toolStripComboBox2.Items.Count - 1;

            cms = new BaseForm.BasicInfoRightMenu(this.dataGridView1);

            this.dataGridView1.RowPostPaint += delegate(object o, DataGridViewRowPostPaintEventArgs ex) { DataGridViewOperator.SetRowNumber((DataGridView)o, ex); };

            this.toolStripComboBox2.SelectedItem = this.WarningDate.ToString();
        }
Example #4
0
        public FormInInventory()
        {
            InitializeComponent();

            #region 电子标签控制
            this.EleModel = SearialiserHelper <Ele_Lab> .DeSerializeFileToObj("EleSetup.bin");

            if (this.EleModel.IsEnabled)
            {
                this.toolStripButton1.Visible = true;//点亮按钮显示,配置标签后,可以显示
                if (elelab.unart_manage.com_manage.FirstOrDefault() == null)
                {
                    int[] ss = new int[] { int.Parse(this.EleModel.PortName.Substring(3)) };
                    elelab.unart_manage.init_com_sys(ss);//初始化串口
                }
            }
            #endregion

            this.Bcms = new BaseForm.BasicInfoRightMenu(this.dataGridView1);
            this.Bcms.InsertDrugBasicInfo();
            this.Bcms.InsertSupplyUnitBasicInfo();
            this.dataGridView1.RowPostPaint   += delegate(object o, DataGridViewRowPostPaintEventArgs ex) { DataGridViewOperator.SetRowNumber((DataGridView)o, ex); };
            this.dataGridView1.CellMouseClick += new DataGridViewCellMouseEventHandler(dataGridView1_CellMouseClick);
        }
Example #5
0
        public FormInstrumentsQuery()
        {
            InitializeComponent();

            #region 右键支持
            BaseForm.BasicInfoRightMenu cms = new BaseForm.BasicInfoRightMenu(this.dataGridView1);
            cms.InserMenu("查看医疗器械信息", delegate()
            {
                this.InstrumentDetailOpen(FormStatusEnum.Read);
            });
            cms.InserMenu("修改医疗器械信息", delegate()
            {
                this.InstrumentDetailOpen(FormStatusEnum.Edit);
            });
            cms.InserMenu("导出当前查询结果列表", delegate()
            {
                MyExcelUtls.DataGridview2Sheet(this.dataGridView1, "医疗器械信息查询结果列表");
            });
            cms.InserMenu("导出当前器械审批表", delegate()
            {
                var u    = this.dataGridView1.CurrentRow.DataBoundItem as Business.Models.InstrumentsModel;
                byte[] b = this.PharmacyDatabaseService.GetUpdateFiles("ApprovalFiles\\医疗器械.doc").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.Inst          = u;

                    if (cww.CreateWord(fs.Name, u.ProductGeneralName, 0))
                    {
                        MessageBox.Show(u.ProductGeneralName + ":审批信息表导出成功!");
                        this.PharmacyDatabaseService.WriteLog(BugsBox.Pharmacy.AppClient.Common.AppClientContext.currentUser.Id, "导出首营医疗器械信息审批表成功!品种名称:" + u.ProductGeneralName);
                    }
                    else
                    {
                        this.PharmacyDatabaseService.WriteLog(BugsBox.Pharmacy.AppClient.Common.AppClientContext.currentUser.Id, "导出首营医疗器械信息审批表失败!品种名称:" + u.ProductGeneralName);
                    }
                    fs.Dispose();
                }
            });
            #endregion

            #region datagridview1事件
            this.dataGridView1.AutoGenerateColumns   = true;
            this.dataGridView1.ReadOnly              = true;
            this.dataGridView1.RowPostPaint         += (sender, ex) => DataGridViewOperator.SetRowNumber((DataGridView)sender, ex);
            this.dataGridView1.CellMouseDoubleClick += (sender, e) =>
            {
                if (e.ColumnIndex < 0 || e.RowIndex < 0)
                {
                    return;
                }
                if (e.Button == System.Windows.Forms.MouseButtons.Left)
                {
                    this.InstrumentDetailOpen(FormStatusEnum.Read);
                }
            };
            #endregion

            #region 文本框键盘事件
            this.textBox1.KeyDown += (sender, e) =>
            {
                if (e.KeyCode == Keys.Return || e.KeyCode == Keys.Enter)
                {
                    this.InstrumentsQuery();
                }
            };
            #endregion

            #region 分页控件事件
            this.pagerControl1.DataPaging += pagerControl1_DataPaging;
            #endregion
        }