/// <summary> /// /// </summary> /// <param name="outInventoryStatus"></param> public FormOutInventorySearch(object outInventoryStatus) { InitializeComponent(); this.dgvOutInventory.AutoGenerateColumns = false; this.Status = EnumHelper <OutInventoryStatus> .Parse(outInventoryStatus.ToString()); this.Text = this.Status == OutInventoryStatus.Outing ? "出库记录查询" : "出库审核记录查询"; }
public FormOutInventoryCenter(object iStatus) { InitializeComponent(); #region 初始化Gridview this.dgvOutInventory.RowPostPaint += delegate(object o, DataGridViewRowPostPaintEventArgs ex) { DataGridViewOperator.SetRowNumber((DataGridView)o, ex); }; this.dgvOutInventory.AutoGenerateColumns = false; #endregion System.Xml.XmlDocument doc = new System.Xml.XmlDocument(); string xmlFile = AppDomain.CurrentDomain.BaseDirectory + "BugsBox.Pharmacy.AppClient.SalePriceType.xml"; doc.Load(xmlFile); System.Xml.XmlNodeList NodeList = doc.SelectNodes("/SalePriceType/SaleOutInventoryChecker"); string FirstChecker = NodeList[0].Attributes[0].Value.ToString(); string SecondChecker = NodeList[0].Attributes[1].Value.ToString(); User CurrentUsr = AppClientContext.CurrentUser; this.Status = EnumHelper <OutInventoryStatus> .Parse(iStatus.ToString()); this.Text = UpdateFormTitle(EnumHelper <OutInventoryStatus> .Parse(iStatus.ToString())); string name = CurrentUsr.Employee.Name; if (iStatus.ToString() == "important") { if (!name.Equals(SecondChecker)) { MessageBox.Show("您没有权限操作!"); this.Dispose(); } } else { if (!name.Equals(FirstChecker)) { MessageBox.Show("您没有权限操作!"); this.Dispose(); } } this.toolStripComboBox1.SelectedIndex = 0; user = this.PharmacyDatabaseService.GetAllUsers(out msg).ToList(); }
public FormOutInventoryCenter(object iStatus) { InitializeComponent(); #region 初始化Gridview和右键 this.dgvOutInventory.RowPostPaint += delegate(object o, DataGridViewRowPostPaintEventArgs ex) { DataGridViewOperator.SetRowNumber((DataGridView)o, ex); }; this.dgvOutInventory.AutoGenerateColumns = false; this.dgvOutInventory.AutoSizeColumnsMode = DataGridViewAutoSizeColumnsMode.AllCells; this.dgvOutInventory.RowHeadersVisible = true; this.brm = new BaseRightMenu(this.dgvOutInventory); #endregion User CurrentUsr = AppClientContext.CurrentUser; this.Status = EnumHelper <OutInventoryStatus> .Parse(iStatus.ToString()); this.Text = UpdateFormTitle(EnumHelper <OutInventoryStatus> .Parse(iStatus.ToString())); string name = CurrentUsr.Employee.Name; this.toolStripComboBox1.SelectedIndex = 0; user = this.PharmacyDatabaseService.GetAllUsers(out msg).ToList(); }
public FormOutInventoryCenter(object iStatus) { InitializeComponent(); #region 初始化Gridview this.dgvOutInventory.RowPostPaint += delegate(object o, DataGridViewRowPostPaintEventArgs ex) { DataGridViewOperator.SetRowNumber((DataGridView)o, ex); }; this.dgvOutInventory.AutoGenerateColumns = false; #endregion var FirstChecker = BugsBoxApplication.Instance.FirstChecker; var SecondChecker = BugsBoxApplication.Instance.SecondChecker; User CurrentUsr = AppClientContext.CurrentUser; this.Status = EnumHelper <OutInventoryStatus> .Parse(iStatus.ToString()); this.Text = UpdateFormTitle(EnumHelper <OutInventoryStatus> .Parse(iStatus.ToString())); string name = CurrentUsr.Employee.Name; if (iStatus.ToString() == "important") { if (!name.Equals(SecondChecker)) { MessageBox.Show("您没有权限操作!"); this.Dispose(); } } else { if (!name.Equals(FirstChecker)) { MessageBox.Show("您没有权限操作!"); this.Dispose(); } } this.toolStripComboBox1.SelectedIndex = 0; user = this.PharmacyDatabaseService.GetAllUsers(out msg).ToList(); }
/// <summary> /// 更新画面按钮状态 /// </summary> /// <param name="status"></param> private void setBtnEnabled(OutInventoryStatus status) { if (status == OutInventoryStatus.None)//无出库状态 { this.btnSubmit.Enabled = true; this.tsbtnAccept.Enabled = false; } else if (status == OutInventoryStatus.Outing)//出库中 { this.btnSubmit.Enabled = false; this.tsbtnAccept.Enabled = true; } else if (status == OutInventoryStatus.important && this.Authorize(ModuleKeys.SpecialDrugApproval))//二次审核 { this.btnSubmit.Enabled = false; this.tsbtnAccept.Enabled = true; } else { this.btnSubmit.Enabled = false; this.tsbtnAccept.Enabled = false; } }
private string UpdateFormTitle(OutInventoryStatus status) { string formTitle = string.Empty; switch (status) { case OutInventoryStatus.None: formTitle = "拣货单新建"; break; case OutInventoryStatus.Outing: formTitle = "出库复核"; break; case OutInventoryStatus.Returning: formTitle = "销退申请处理"; break; case OutInventoryStatus.important: formTitle = "特殊药品二次复核"; break; } return(formTitle); }