private void tsAddModel_Click(object sender, EventArgs e) { if (tvtype.SelectedNode != null) { HIS.ZYNurse_BLL.FeeModelProcess model = (HIS.ZYNurse_BLL.FeeModelProcess)tvtype.SelectedNode.Tag; if (model.MODEL_TYPE == 1) { MessageBox.Show("模板下边不能添加模板"); return; } FrmAddModel frnAdd = new FrmAddModel(); frnAdd.level = level; frnAdd.lbtext = "请输入模板的名称:"; frnAdd.type = 1; frnAdd.ShowDialog(); if (frnAdd.modelName != "") { HIS.ZYNurse_BLL.FeeModelProcess newtype = new HIS.ZYNurse_BLL.FeeModelProcess(); newtype.MODEL_TYPE = 1; newtype.MODEL_NAME = frnAdd.modelName; newtype.MODEL_LEVEL = level; newtype.P_ID = model.MODEL_ID; newtype.CREATE_DATE = XcDate.ServerDateTime; newtype.CREATE_DEPT = Convert.ToInt32(_currentDept.DeptID); newtype.CREATE_NURSE = Convert.ToInt32(_currentUser.EmployeeID); newtype.Add(); InitNode(); } } }
private void FrmFeeModel_Load(object sender, EventArgs e) { _currentModel = new HIS.ZYNurse_BLL.FeeModelProcess(); OP_Account op_account = new OP_Account(); dtItem = op_account.getItems(); dtItem.TableName = "Itemslist"; dgvFeeModel.SetSelectionCardDataSource(dtItem, item_name.Index); dtAllItems = dtItem.Clone(); for (int i = 0; i < dtItem.Rows.Count; i++) { dtAllItems.Rows.Add(dtItem.Rows[i].ItemArray); } Op_BaseData basedata = new Op_BaseData(); DataTable yf = basedata.GetYfName(); if (yf == null || yf.Rows.Count == 1) { this.cbYf.Text = "全部药房"; this.cbYf.Visible = false; this.lbyf.Visible = false; } else { this.cbYf.Visible = true; this.lbyf.Visible = true; this.cbYf.DisplayMember = "Name"; this.cbYf.ValueMember = "Value"; cbYf.DataSource = basedata.Get_dept_yfName(Convert.ToInt32(_currentDept.DeptID)); this.cbYf.SelectedIndex = 0; } }
private void tvtype_AfterSelect(object sender, TreeViewEventArgs e) { if (tvtype.SelectedNode != null) { dgvFeeModel.DataSource = null; _currentModel = (HIS.ZYNurse_BLL.FeeModelProcess)tvtype.SelectedNode.Tag; txtModelName.Text = _currentModel.MODEL_NAME; BindFeeModel(); } }
private void tsUpdate_Click(object sender, EventArgs e) { if (tvtype.SelectedNode != null) { HIS.ZYNurse_BLL.FeeModelProcess model = (HIS.ZYNurse_BLL.FeeModelProcess)tvtype.SelectedNode.Tag; FrmAddModel frnAdd = new FrmAddModel(); frnAdd.level = level; frnAdd.lbtext = "请输入修改后的名称:"; frnAdd.ShowDialog(); if (frnAdd.modelName != "") { model.MODEL_NAME = frnAdd.modelName; model.Update(); InitNode(); } } }