Example #1
0
 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();
         }
     }
 }
Example #2
0
 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();
         }
     }
 }