/// <summary> /// 应用程序的主入口点。 /// </summary> private void Frmxspm_Load(object sender, System.EventArgs e) { try { dtp1.Value = DateManager.ServerDateTimeByDBType(InstanceForm.BDatabase); dtp2.Value = DateManager.ServerDateTimeByDBType(InstanceForm.BDatabase); //初始化 FunBase.CsDataGrid(this.myDataGrid1, this.myDataGrid1.TableStyles[0], "Tb"); //Yp.AddCmbYplx(true,InstanceForm.BCurrentDept.DeptId,cmbyplx, InstanceForm.BDatabase); this.rdo1.Checked = true; Yp.AddcmbYjks(true, cmbyjks, DeptType.药房, InstanceForm.BDatabase, InstanceForm._menuTag.Jgbm); if (YpConfig.kslx(InstanceForm.BCurrentDept.DeptId, InstanceForm.BDatabase) != DeptType.未知) { cmbyjks.SelectedValue = InstanceForm.BCurrentDept.DeptId; cmbyjks.Enabled = false; } Yp.AddcmbYear(Convert.ToInt32(cmbyjks.SelectedValue), cmbyear, InstanceForm.BDatabase); } catch (System.Exception err) { MessageBox.Show("发生错误" + err.Message); } }
/// <summary> /// 应用程序的主入口点。 /// </summary> private void Frmxspm_Load(object sender, System.EventArgs e) { try { dtp1.Value = Convert.ToDateTime(DateManager.ServerDateTimeByDBType(InstanceForm.BDatabase).ToShortDateString() + " 00:00:00"); dtp2.Value = Convert.ToDateTime(DateManager.ServerDateTimeByDBType(InstanceForm.BDatabase).ToShortDateString() + " 23:59:59"); //初始化 FunBase.CsDataGrid(this.myDataGrid1, this.myDataGrid1.TableStyles[0], "Tb"); Yp.AddcmbYjks(true, cmbyjks, DeptType.药房, InstanceForm.BDatabase, InstanceForm._menuTag.Jgbm); if (YpConfig.kslx(InstanceForm.BCurrentDept.DeptId, InstanceForm.BDatabase) != DeptType.未知) { cmbyjks.SelectedValue = InstanceForm.BCurrentDept.DeptId; cmbyjks.Enabled = false; } else { cmbyjks.SelectedIndex = 0; } } catch (System.Exception err) { MessageBox.Show("发生错误" + err.Message); } }
private void FrmYfGzlTj_Load(object sender, EventArgs e) { try { DateTime dt = DateManager.ServerDateTimeByDBType(InstanceForm.BDatabase); dtp1.Value = dt.AddDays((1 - dt.Day)); dtp2.Value = dt.AddDays((1 - dt.Day)).AddMonths(1).AddDays(-1); //初始化 FunBase.CsDataGrid(this.myDataGrid1, this.myDataGrid1.TableStyles[0], "Tb"); //Yp.AddcmbYear(InstanceForm.BCurrentDept.DeptId, this.cmbypzlx, InstanceForm.BDatabase); //Yp.AddCmbYplx(true,InstanceForm.BCurrentDept.DeptId,cmbyplx, InstanceForm.BDatabase); //this.rdo1.Checked = true; Yp.AddcmbYjks(cmbyjks, DeptType.药房, InstanceForm.BDatabase, InstanceForm._menuTag.Jgbm); if (YpConfig.kslx(InstanceForm.BCurrentDept.DeptId, InstanceForm.BDatabase) != DeptType.未知) { cmbyjks.SelectedValue = InstanceForm.BCurrentDept.DeptId; cmbyjks.Enabled = false; } } catch (System.Exception err) { MessageBox.Show("发生错误" + err.Message); } }
private void Frmyfckmx_Load(object sender, EventArgs e) { try { this.WindowState = FormWindowState.Maximized; //dtp1.Value = DateManager.ServerDateTimeByDBType(InstanceForm.BDatabase); //dtp2.Value = DateManager.ServerDateTimeByDBType(InstanceForm.BDatabase); //this.rdo1.Checked = true; radioButton1.Checked = true; Yp.AddcmbYjks(true, cmbyjks, DeptType.药房, InstanceForm.BDatabase, InstanceForm._menuTag.Jgbm); if (YpConfig.kslx(InstanceForm.BCurrentDept.DeptId, InstanceForm.BDatabase) != DeptType.未知) { cmbyjks.SelectedValue = InstanceForm.BCurrentDept.DeptId; cmbyjks.Enabled = false; } cmbyear.Items.AddRange(new object[] { DateTime.Now.Year, DateTime.Now.AddYears(-1).Year }); cmbmonth.Items.AddRange(new object[] { "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12" }); cmbyear.Text = DateTime.Now.Year.ToString(); cmbmonth.Text = DateTime.Now.Month.ToString(); //Yp.AddcmbYear(Convert.ToInt32(cmbyjks.SelectedValue), cmbyear, InstanceForm.BDatabase); } catch (System.Exception err) { MessageBox.Show("发生错误" + err.Message); } }
public Frmhwsz(MenuTag menuTag, string chineseName, Form mdiParent) { // // Windows 窗体设计器支持所必需的 // InitializeComponent(); _menuTag = menuTag; _chineseName = chineseName; _mdiParent = mdiParent; this.Text = _chineseName; this.Text = this.Text + " [" + InstanceForm._menuTag.Jgbm + "]"; if (menuTag.Function_Name == "Fun_ts_yp_xtwh_kwsz") { Yp.AddcmbYjks(cmbyjks, DeptType.药库, InstanceForm.BDatabase, InstanceForm._menuTag.Jgbm); } else { Yp.AddcmbYjks(cmbyjks, DeptType.药房, InstanceForm.BDatabase, InstanceForm._menuTag.Jgbm); } if (InstanceForm.BCurrentUser.IsAdministrator == false) { cmbyjks.SelectedValue = InstanceForm.BCurrentDept.DeptId; cmbyjks.Enabled = false; } Yp.AddCmbYplx(true, Convert.ToInt32(Convertor.IsNull(cmbyjks.SelectedValue, "0")), cmbyplx, InstanceForm.BDatabase); Yp.AddcmbYpjx(true, Convert.ToInt32(Convertor.IsNull(cmbyplx.SelectedValue, "0")), cmbjx, InstanceForm.BDatabase); cmbyplx.Text = "全部"; cmbjx.Text = "全部"; // // TODO: 在 InitializeComponent 调用后添加任何构造函数代码 // }
private void Frmkccx_Load(object sender, System.EventArgs e) { FunBase.CsDataGrid(this.myDataGrid1, this.myDataGrid1.TableStyles[0], "Tb"); Yp.AddcmbYjks(cmbyjks, DeptType.药房, InstanceForm.BDatabase, InstanceForm._menuTag.Jgbm); if (YpConfig.kslx(InstanceForm.BCurrentDept.DeptId, InstanceForm.BDatabase) != DeptType.未知) { cmbyjks.SelectedValue = InstanceForm.BCurrentDept.DeptId; cmbyjks.Enabled = false; } txtxm.Enabled = true; }
/// <summary> /// 应用程序的主入口点。 /// </summary> private void Frmkcgdcbj_Load(object sender, System.EventArgs e) { CsMydataGrid(this.rdo1.Checked); Yp.AddcmbYjks(cmbyjks, DeptType.药房, InstanceForm.BDatabase, InstanceForm._menuTag.Jgbm); if (YpConfig.kslx(InstanceForm.BCurrentDept.DeptId, InstanceForm.BDatabase) != DeptType.未知) { cmbyjks.SelectedValue = InstanceForm.BCurrentDept.DeptId; cmbyjks.Enabled = false; } Yp.AddCmbYplx(true, Convert.ToInt32(cmbyjks.SelectedValue), this.cmbyplx, InstanceForm.BDatabase); }
private void Frmsccj_Load(object sender, System.EventArgs e) { try { //初始化 DataTable myTb = new DataTable(); for (int i = 0; i <= this.myDataGrid1.TableStyles[0].GridColumnStyles.Count - 1; i++) { if (this.myDataGrid1.TableStyles[0].GridColumnStyles[i].GetType().ToString() == "System.Windows.Forms.DataGridBoolColumn") { myTb.Columns.Add(this.myDataGrid1.TableStyles[0].GridColumnStyles[i].HeaderText, Type.GetType("System.Int16")); } else { myTb.Columns.Add(this.myDataGrid1.TableStyles[0].GridColumnStyles[i].HeaderText, Type.GetType("System.String")); } this.myDataGrid1.TableStyles[0].GridColumnStyles[i].MappingName = this.myDataGrid1.TableStyles[0].GridColumnStyles[i].HeaderText; this.myDataGrid1.TableStyles[0].GridColumnStyles[i].NullText = ""; } this.myDataGrid1.DataSource = myTb; this.myDataGrid1.TableStyles[0].MappingName = "Tb"; if (_menuTag.Function_Name == "Fun_ts_yp_xtwh_kcsxx") { Yp.AddcmbYjks(cmbyjks, DeptType.药库, InstanceForm.BDatabase, InstanceForm._menuTag.Jgbm); } else { Yp.AddcmbYjks(cmbyjks, DeptType.药房, InstanceForm.BDatabase, InstanceForm._menuTag.Jgbm); } if (InstanceForm.BCurrentUser.IsAdministrator == false) { cmbyjks.SelectedValue = InstanceForm.BCurrentDept.DeptId; cmbyjks.Enabled = false; } } catch (System.Exception err) { MessageBox.Show("发生错误" + err.Message); } }
private void Frmgqyptj_Load(object sender, EventArgs e) { try { Yp.AddcmbYjks(cmbyjks, DeptType.药房, InstanceForm.BDatabase, InstanceForm._menuTag.Jgbm); cmbyjks.SelectedValue = InstanceForm.BCurrentDept.DeptId; if (cmbyjks.SelectedIndex < 0) { cmbyjks.Text = "全部"; } } catch (Exception ex) { MessageBox.Show(ex.Message); } }
private void FrmJyxsHZtj_Load(object sender, EventArgs e) { try { Yp.AddcmbYjks(true, cmbyjks, DeptType.药房, InstanceForm.BDatabase, InstanceForm._menuTag.Jgbm); if (YpConfig.kslx(InstanceForm.BCurrentDept.DeptId, InstanceForm.BDatabase) != DeptType.未知) { cmbyjks.SelectedValue = InstanceForm.BCurrentDept.DeptId; cmbyjks.Enabled = false; } Yp.AddCmbYplx(true, Convert.ToInt32(cmbyjks.SelectedValue), this.cmbyplx, InstanceForm.BDatabase); cmbypsx.SelectedIndex = 10; } catch (Exception ex) { MessageBox.Show(ex.Message); } }
private void Frmxspm_Load(object sender, System.EventArgs e) { try { dtp1.Value = DateManager.ServerDateTimeByDBType(InstanceForm.BDatabase); dtp2.Value = DateManager.ServerDateTimeByDBType(InstanceForm.BDatabase); //初始化 DataTable myTb = new DataTable(); myTb.TableName = "Tb"; for (int i = 0; i <= this.myDataGrid1.TableStyles[0].GridColumnStyles.Count - 1; i++) { if (this.myDataGrid1.TableStyles[0].GridColumnStyles[i].GetType().ToString() == "System.Windows.Forms.DataGridBoolColumn") { myTb.Columns.Add(this.myDataGrid1.TableStyles[0].GridColumnStyles[i].HeaderText, typeof(bool)); } else { myTb.Columns.Add(this.myDataGrid1.TableStyles[0].GridColumnStyles[i].HeaderText, Type.GetType("System.String")); } this.myDataGrid1.TableStyles[0].GridColumnStyles[i].NullText = ""; this.myDataGrid1.TableStyles[0].GridColumnStyles[i].MappingName = this.myDataGrid1.TableStyles[0].GridColumnStyles[i].HeaderText; } this.myDataGrid1.DataSource = myTb; this.myDataGrid1.TableStyles[0].MappingName = "Tb"; Yp.AddcmbYjks(cmbyjks, DeptType.药房, InstanceForm.BDatabase, InstanceForm._menuTag.Jgbm); if (YpConfig.kslx(InstanceForm.BCurrentDept.DeptId, InstanceForm.BDatabase) != DeptType.未知) { cmbyjks.SelectedValue = InstanceForm.BCurrentDept.DeptId; cmbyjks.Enabled = false; } Yp.AddCmbYplx(true, Convert.ToInt32(cmbyjks.SelectedValue), this.cmbyplx, InstanceForm.BDatabase); } catch (System.Exception err) { MessageBox.Show("发生错误" + err.Message); } }
private void Xspm_kss_Load(object sender, EventArgs e) { try { Yp.AddcmbYjks(true, cmbyjks, DeptType.药房, InstanceForm.BDatabase, InstanceForm._menuTag.Jgbm); if (YpConfig.kslx(InstanceForm.BCurrentDept.DeptId, InstanceForm.BDatabase) != DeptType.未知) { cmbyjks.SelectedValue = InstanceForm.BCurrentDept.DeptId; cmbyjks.Enabled = false; } Yp.AddCmbYplx(true, Convert.ToInt32(cmbyjks.SelectedValue), this.cmbyplx, InstanceForm.BDatabase); cmbypsx.SelectedIndex = 10; } catch (Exception ex) { MessageBox.Show(ex.Message); } //this.dtp2.Text = DateTime.Now.AddMonths(-1).ToString("yyyy-MM-dd"); this.dtp1.Text = DateTime.Now.ToString("yyyy-MM-") + "01"; }
private void Frmyfkpz_Load(object sender, System.EventArgs e) { //初始化 DataTable myTb = new DataTable(); myTb.TableName = "Tb"; for (int i = 0; i <= this.myDataGrid1.TableStyles[0].GridColumnStyles.Count - 1; i++) { if (this.myDataGrid1.TableStyles[0].GridColumnStyles[i].GetType().ToString() == "System.Windows.Forms.DataGridBoolColumn") { myTb.Columns.Add(this.myDataGrid1.TableStyles[0].GridColumnStyles[i].HeaderText, typeof(bool)); } else { myTb.Columns.Add(this.myDataGrid1.TableStyles[0].GridColumnStyles[i].HeaderText, Type.GetType("System.String")); } this.myDataGrid1.TableStyles[0].GridColumnStyles[i].MappingName = this.myDataGrid1.TableStyles[0].GridColumnStyles[i].HeaderText; } this.myDataGrid1.DataSource = myTb; this.myDataGrid1.TableStyles[0].MappingName = "Tb"; this.AddData(); if (_menuTag.Function_Name == "Fun_ts_yp_xtwh_config") { Yp.AddcmbYjks(cmbyjks, DeptType.药库, InstanceForm.BDatabase, InstanceForm._menuTag.Jgbm); } else { Yp.AddcmbYjks(cmbyjks, DeptType.药房, InstanceForm.BDatabase, InstanceForm._menuTag.Jgbm); } if (InstanceForm.BCurrentUser.IsAdministrator == false) { cmbyjks.SelectedValue = InstanceForm.BCurrentDept.DeptId; cmbyjks.Enabled = false; } }
private void Frmkccx_Load(object sender, System.EventArgs e) { this.dtp1.Value = DateManager.ServerDateTimeByDBType(InstanceForm.BDatabase); this.dtp2.Value = DateManager.ServerDateTimeByDBType(InstanceForm.BDatabase); FunBase.CsDataGrid(this.myDataGrid1, this.myDataGrid1.TableStyles[0], "Tb"); //Yp.AddcmbYear(InstanceForm.BCurrentDept.DeptId, this.cmbypzlx, InstanceForm.BDatabase); this.rdo1.Checked = true; // Yp.AddCmbYplx(true,InstanceForm.BCurrentDept.DeptId,this.cmbyplx,InstanceForm.BDatabase); Yp.AddcmbYjks(true, cmbyjks, DeptType.药房, InstanceForm.BDatabase, InstanceForm._menuTag.Jgbm); if (YpConfig.kslx(InstanceForm.BCurrentDept.DeptId, InstanceForm.BDatabase) != DeptType.未知) { cmbyjks.SelectedValue = InstanceForm.BCurrentDept.DeptId; cmbyjks.Enabled = false; } Yp.AddcmbYear(Convert.ToInt32(cmbyjks.SelectedValue), cmbyear, InstanceForm.BDatabase); s = new YpConfig(Convert.ToInt32(cmbyjks.SelectedValue), InstanceForm.BDatabase); }
public Frmjmypcx(MenuTag menuTag, string chineseName, Form mdiParent) : this() { _menuTag = menuTag; _chineseName = chineseName; _mdiParent = mdiParent; this.Text = chineseName; Yp.AddcmbWardDept(cmbbs1, 1, 0, InstanceForm.BDatabase, InstanceForm._menuTag.Jgbm); Yp.AddcmbYjks(true, cmbyjks, DeptType.药房, InstanceForm.BDatabase, InstanceForm._menuTag.Jgbm); cmbyjks.SelectedValue = InstanceForm.BCurrentDept.DeptId.ToString(); if (cmbyjks.SelectedIndex == -1) { cmbyjks.SelectedIndex = 0; } //CshMxGrid(this.myDataGrid1); //CshHzGrid(this.myDataGrid2); this.dtprq1.Value = Convert.ToDateTime(DateManager.ServerDateTimeByDBType(InstanceForm.BDatabase).ToShortDateString() + " 00:00:00"); this.dtprq2.Value = Convert.ToDateTime(DateManager.ServerDateTimeByDBType(InstanceForm.BDatabase).ToShortDateString() + " 23:59:59"); }