/// <summary> /// 删除组 /// </summary> /// <param name="Person"></param> /// <param name="Group"></param> /// <returns></returns> public int DeletePersonGroup(Neusoft.HISFC.Models.Base.Employee Person, Neusoft.FrameWork.Models.NeuObject Group) { string strSql = ""; if (this.Sql.GetSql("Manager.UserManager.PersonGroup.Delete.1", ref strSql) == -1) { return(-1); } try { string[] s = new string[8]; s[0] = Group.ID; s[1] = Group.Name; s[2] = Person.ID; s[3] = Person.Name; s[4] = Person.Password; s[5] = Person.User01; s[6] = Neusoft.FrameWork.Function.NConvert.ToInt32(Person.IsManager).ToString(); s[7] = this.Operator.ID; strSql = string.Format(strSql, s); } catch (Exception ex) { this.Err = "赋值时候出错!" + ex.Message; this.WriteErr(); return(-1); } if (this.ExecNoQuery(strSql) <= 0) //insert { return(-1); } return(0); }
/// <summary> /// 释放资源 /// </summary> /// <param name="isDisposing"></param> protected override void Dispose(bool isDisposing) { if (this.alreadyDisposed) { return; } if (this.pact != null) { this.pact.Dispose(); this.pact = null; } if (this.minFee != null) { this.minFee.Dispose(); this.minFee = null; } if (this.rate != null) { this.rate.Dispose(); this.rate = null; } base.Dispose(isDisposing); this.alreadyDisposed = true; }
/// <summary> /// 释放资源 /// </summary> /// <param name="isDisposing"></param> protected override void Dispose(bool isDisposing) { if (this.alreadyDisposed) { return; } if (this.dept != null) { this.dept.Dispose();; this.dept = null; } if (this.group != null) { this.group.Dispose(); this.group = null; } if (this.noticeDept != null) { this.noticeDept.Dispose(); this.noticeDept = null; } base.Dispose(isDisposing); this.alreadyDisposed = true; }
/// <summary> /// 释放资源 /// </summary> /// <param name="isDisposing"></param> protected override void Dispose(bool isDisposing) { if (this.alreadyDisposed) { return; } if (this.operEnvironment != null) { this.operEnvironment.Dispose(); this.operEnvironment = null; } if (this.group != null) { this.group.Dispose(); this.group = null; } if (this.pact != null) { this.pact.Dispose(); this.pact = null; } if (this.statClass != null) { this.statClass.Dispose(); this.statClass = null; } base.Dispose(isDisposing); this.alreadyDisposed = true; }
/// <summary> /// 根据病区查找空位病床 /// </summary> /// <param name="nurseCellId"></param> protected virtual void GetBedByDeptCode(Neusoft.FrameWork.Models.NeuObject deptObj) { ArrayList alNurseCell = mamagerInteger.QueryNurseStationByDept(deptObj); ArrayList alBed = new ArrayList(); foreach (NeuObject obj in alNurseCell) { ArrayList temp = mamagerInteger.QueryUnoccupiedBed(obj.ID); if (temp != null && temp.Count > 0) { alBed.AddRange(temp); } } lvBed.Items.Clear(); if (alBed != null) { ListViewItem lvi; for (int i = 0; i < alBed.Count; i++) { bed = alBed[i] as Neusoft.HISFC.Models.Base.Bed; lvi = new ListViewItem(); lvi.Text = bed.ID.Length > 4 ? bed.ID.Substring(4) : ""; lvi.SubItems.Add(new ListViewItem.ListViewSubItem(lvi, bed.Sex.Name)); lvi.SubItems.Add(new ListViewItem.ListViewSubItem(lvi, bed.BedGrade.Name)); lvi.SubItems.Add(new ListViewItem.ListViewSubItem(lvi, bed.SickRoom.ID)); lvi.SubItems.Add(new ListViewItem.ListViewSubItem(lvi, bed.IsValid ? "是" : "否")); lvi.Tag = bed; this.lvBed.Items.Add(lvi); } } }
/// <summary> /// 获取并显示选择的午别 /// </summary> /// <returns>0-成功;-1-失败</returns> private int ProcessNoon() { // 当前行 int currentRow = this.neuSpread1_Sheet1.ActiveRowIndex; // 午别控件 Neusoft.FrameWork.WinForms.Controls.PopUpListBox listBox = this.neuSpread1.getCurrentList(this.neuSpread1_Sheet1, 5); //选中的午别 Neusoft.FrameWork.Models.NeuObject noon = null; if (currentRow < 0) { return(0); } // 获取选择的午别 listBox.GetSelectedItem(out noon); if (noon == null) { return(-1); } // 显示午别 this.neuSpread1_Sheet1.SetValue(currentRow, 5, noon.Name); this.neuSpread1.SetAllListBoxUnvisible(); // 成功返回 return(0); }
/// <summary> /// 返回科室核算 里全院底下第一级节点的所有部门的编码和名称 用于报表打印, 提供 何善衡楼和住院处 /// </summary> /// <returns></returns> /// [email protected] public ArrayList GetSubTreeNodeForFinance() { ArrayList al = new ArrayList(); try { string strSql = ""; //取SQL语句 if (this.Sql.GetSql("Manager.DepartmentStatManager.GetSubTreeNode", ref strSql) == -1) { return(null); } if (this.ExecQuery(strSql) < 0) { return(null); } Neusoft.FrameWork.Models.NeuObject obj = null; while (this.Reader.Read()) { obj = new NeuObject(); obj.ID = Reader[0].ToString(); // 科室编码 obj.Name = Reader[1].ToString(); // 科室名称 obj.User01 = Reader[2].ToString(); // 父科室编码 obj.User02 = Reader[3].ToString(); //父科室名称 al.Add(obj); obj = null; } } catch (Exception ee) { this.Err = ee.Message; al = null; } return(al); }
/// <summary> /// 删除执行单内容其中的一个项目 /// 必须填写(objBill.ID 执行单流水号,objBill.Memo执行单类型,1药/2非药,objBill.user01 医嘱类型, /// objBill.user02非药系统类别、药品类别,objBill.user03 药品用法) /// </summary> /// <param name="objBill"></param> /// <returns></returns> public int DeleteExecBillOneItem(Neusoft.FrameWork.Models.NeuObject objBill) { string strSql = ""; #region "接口" //传入:0 执行单流水号 1医嘱类型 2非药系统类别、药品类别 3药品用法 //传出:0 #endregion if (this.Sql.GetSql("Order.ExecBill.DeleteItem.OneItem", ref strSql) == -1) { this.Err = this.Sql.Err; return(-1); } try { strSql = string.Format(strSql, objBill.ID, objBill.User01, objBill.User02, objBill.User03); } catch (Exception ex) { this.Err = ex.Message; this.ErrCode = ex.Message; this.WriteErr(); return(-1); } return(this.ExecNoQuery(strSql)); }
/// <summary> /// 根据科室刷新患者列表 /// </summary> /// <param name="deptObj"></param> private void RefreshListPatient(Neusoft.FrameWork.Models.NeuObject deptObj) { Neusoft.HISFC.Models.RADT.InStateEnumService enumState = new Neusoft.HISFC.Models.RADT.InStateEnumService(); //在院状态 enumState.ID = Neusoft.HISFC.Models.Base.EnumInState.I.ToString(); ArrayList al = radtInteger.QueryPatientByDeptCode(deptObj.ID, enumState); //预约出院状态 enumState.ID = Neusoft.HISFC.Models.Base.EnumInState.P.ToString(); ArrayList al1 = radtInteger.QueryPatientByDeptCode(deptObj.ID, enumState); if (al == null) { al = al1; } else { if (al1 != null) { al.AddRange(al1); } } listPatient.Items.Clear(); if (al != null) { this.listPatient.Items.AddRange(al.ToArray()); } }
/// <summary> /// 这个要改成静态的就可以实现实时刷新了,但没想好呢,先被非静态吧! /// </summary> //public static string hosCode = Neusoft.FrameWork.Management.Connection.Hospital.ID; //public string HosCode //{ // get // { // //if (string.IsNullOrEmpty(currenInterfaceProfileTable) == true) // //{ // // GetCurrenInterfaceProfileTable(ref currenInterfaceProfileTable); // // if (string.IsNullOrEmpty(currenInterfaceProfileTable) == true) // // { // // currenInterfaceProfileTable = @"COM_MAINTENANCE_REPORT_PRINT"; // // } // //} // return hosCode; // } //} public virtual int QueryCurrenInterfaceProfileTable(ref List <NeuObject> listInterfaceProfileTable) { //listInterfaceProfileTable listInterfaceProfileTable = new List <Neusoft.FrameWork.Models.NeuObject>(); try { string sql = string.Format(@"select t.TABLE_NAME ,t.PROFILE_NAME,t.IS_IN_USE from COM_INTERFACE_SETTING t "); int ret = this.ExecQuery(sql); if (ret == -1) { //System.Windows.Forms.MessageBox.Show(this.Err); return(ret); } while (this.Reader.Read()) { //读取第一个 Neusoft.FrameWork.Models.NeuObject no = new Neusoft.FrameWork.Models.NeuObject(); no.ID = this.Reader[0].ToString(); no.Name = this.Reader[1].ToString(); no.Memo = this.Reader[2].ToString(); listInterfaceProfileTable.Add(no); } this.Reader.Dispose(); this.Reader.Close(); } catch (Exception ex) { //System.Windows.Forms.MessageBox.Show(this.Err + ex.Message); } return(0); }
public int JudgeType(Neusoft.FrameWork.Models.NeuObject obj) { string sql = "select count(*) from " + this.CurrenInterfaceProfileTable + " a ,com_controlargument b where a.containertype='{0}' or b.kind='{0}'"; sql = string.Format(sql, obj.ID); int ret = this.ExecQuery(sql); int count = 0; while (this.Reader.Read()) { count = Convert.ToInt32(this.Reader[0].ToString()); } if (count > 0) { return(-1); } if (count == 0) { return(0); } if (ret == -1) { return(-1); } return(ret); }
/// <summary> /// 取当前被选中的数据 /// </summary> private void GetItem() { //没有数据则返回 if (this.fpData_Sheet1.RowCount == 0) { return; } //取当前行的数据。 string ID = this.fpData_Sheet1.Cells[this.fpData_Sheet1.ActiveRowIndex, 0].Text; //根据编码取对应的对象 this.myObject = objHelper.GetObjectFromID(ID); if (this.myObject == null) { MessageBox.Show("没有找到有效的数据", "无法找到数据"); return; } try { //抛出事件,传出用户选中的对象。用户需要通过定义此事件来接收数据 SelectedItem(this.myObject); } catch {} this.DialogResult = DialogResult.OK; //this.Close(); }
/// <summary> /// 释放资源 /// </summary> /// <param name="isDisposing"></param> protected override void Dispose(bool isDisposing) { if (this.alreadyDisposed) { return; } if (this.pactItem != null) { this.pactItem.Dispose(); this.pactItem = null; } if (this.rate != null) { this.rate.Dispose(); this.rate = null; } if (this.operEnvironment != null) { this.operEnvironment.Dispose(); this.operEnvironment = null; } base.Dispose(isDisposing); this.alreadyDisposed = true; }
/// <summary> /// 执行单设置(批量导入用) /// 必须填写(objBill.Name 执行单名,objBill.Memo执行单类型,1药/2非药,objBill.user01 医嘱类型 /// objBill.user02非药系统类别、药品类别 objBill.user03 药品用法) /// </summary> /// <param name="al"></param> /// <param name="nurseCode"></param> /// <returns></returns> public int SetExecBillNew(ArrayList al, Neusoft.FrameWork.Models.NeuObject objExecBill, string nurseCode, ref string billID) { Neusoft.FrameWork.Models.NeuObject obj = new NeuObject(); Neusoft.FrameWork.Models.NeuObject objExecInfo = objExecBill.Clone(); if (al.Count == 0) { this.Err = Neusoft.FrameWork.Management.Language.Msg("没有维护详细项目!"); return(-1); } if (this.SetExecBill(objExecInfo, nurseCode) == -1) { this.Err = Neusoft.FrameWork.Management.Language.Msg("执行单设置失败!") + this.Err; return(-1); } if (objExecInfo.Memo == "1") { for (int i = 0; i < al.Count; i++) { Neusoft.HISFC.Models.Order.Inpatient.Order orderInfo = (Neusoft.HISFC.Models.Order.Inpatient.Order)al[i]; orderInfo.ID = objExecInfo.ID; if (orderInfo.ID == "-1" || orderInfo.ID == "") { return(-1); } if (this.InsertExecBillItem(nurseCode, objExecInfo.ID, orderInfo.OrderType.ID, orderInfo.Item.SysClass.ID.ToString(), orderInfo.Item.ID, orderInfo.Item.Name) < 0) { this.Err = Neusoft.FrameWork.Management.Language.Msg("执行单设置失败!") + this.Err; return(-1); } } } else { for (int i = 0; i < al.Count; i++) { Neusoft.HISFC.Models.Order.Inpatient.Order orderInfo = (Neusoft.HISFC.Models.Order.Inpatient.Order)al[i]; obj.ID = objExecInfo.ID; obj.User02 = orderInfo.Item.User01; obj.User01 = orderInfo.OrderType.ID; obj.User03 = orderInfo.Usage.ID; obj.Memo = "1"; if (obj.ID == "-1" || obj.ID == "") { return(-1); } if (InsertExecBill(obj, nurseCode) < 0) { this.Err = Neusoft.FrameWork.Management.Language.Msg("执行单设置失败!") + this.Err; return(-1); } } } billID = objExecInfo.ID; return(0); }
public int DeleteType(Neusoft.FrameWork.Models.NeuObject obj) { string sql = "delete from COM_REPORTPRINT_TYPE where ID='{0}'"; sql = string.Format(sql, obj.ID); int ret = this.ExecNoQuery(sql); return(ret); }
/// <summary> /// 执行单设置 /// 必须填写(objBill.Name 执行单名,objBill.Memo执行单类型,1药/2非药,objBill.user01 医嘱类型 /// objBill.user02非药系统类别、药品类别 objBill.user03 药品用法) /// </summary> /// <param name="al"></param> /// <param name="nurseCode"></param> /// <returns></returns> public int SetExecBill(ArrayList al, Neusoft.FrameWork.Models.NeuObject objExecBill, string nurseCode, ref string billID) { string strSql = ""; string strBillNo = ""; Neusoft.FrameWork.Models.NeuObject obj = new NeuObject(); if (al.Count == 0) { this.Err = Neusoft.FrameWork.Management.Language.Msg("没有维护详细项目!"); return(-1); } strBillNo = GetNewExecBillID(); if (strBillNo == "-1" || strBillNo == "") { return(-1); } if (this.Sql.GetSql("Order.ExecBill.InsertItem", ref strSql) == -1) { this.Err = this.Sql.Err; return(-1); } try { strSql = string.Format(strSql, nurseCode, strBillNo, objExecBill.Name, this.Operator.ID, objExecBill.User02, objExecBill.User01); } catch (Exception ex) { this.Err = ex.Message; this.ErrCode = ex.Message; this.WriteErr(); return(-1); } if (this.ExecNoQuery(strSql) < 0) { return(-1); } for (int i = 0; i < al.Count; i++) { obj = (Neusoft.FrameWork.Models.NeuObject)al[i]; obj.ID = strBillNo; if (obj.ID == "-1" || obj.ID == "") { return(-1); } if (InsertExecBill(obj, nurseCode) < 0) { this.Err = Neusoft.FrameWork.Management.Language.Msg("执行单设置失败!") + this.Err; return(-1); } } billID = strBillNo; return(0); }
/// <summary> /// 配置中心收费 /// </summary> /// <param name="arrayApplyOut">住院配置数据</param> /// <param name="execDept">执行科室</param> /// <returns>成功返回1 失败返回-1</returns> internal static int CompoundFee(ArrayList arrayApplyOut, Neusoft.FrameWork.Models.NeuObject execDept, System.Data.IDbTransaction trans) { Neusoft.HISFC.BizProcess.Integrate.Pharmacy pharmacyIntegrate = new Neusoft.HISFC.BizProcess.Integrate.Pharmacy(); if (pharmacyIntegrate.CompoundFee(arrayApplyOut, execDept, trans) != 1) { System.Windows.Forms.MessageBox.Show(pharmacyIntegrate.Err); return(-1); } return(1); }
/// <summary> /// 配置中心收费 /// </summary> /// <param name="arrayApplyOut">住院配置数据</param> /// <param name="execDept">执行科室</param> /// <returns>成功返回1 失败返回-1</returns> internal static int CompoundFee(ArrayList arrayApplyOut, Neusoft.FrameWork.Models.NeuObject execDept, System.Data.IDbTransaction trans) { Neusoft.HISFC.BizProcess.Integrate.Pharmacy pharmacyIntegrate = new Neusoft.HISFC.BizProcess.Integrate.Pharmacy(); //{0C5037B6-06FB-4dd8-AED8-B7412D2A6576} 更改对返回值的判断 仅判断是否为-1 if (pharmacyIntegrate.CompoundFee(arrayApplyOut, execDept, trans) == -1) { System.Windows.Forms.MessageBox.Show(pharmacyIntegrate.Err); return(-1); } return(1); }
/// <summary> /// 更新执行内容 ///必须填写(objBill.ID 执行单流水号,objBill.Memo执行单类型,1药/2非药,objBill.user01 医嘱类型, /// objBill.user02非药系统类别、药品类别,objBill.user03 药品用法) /// </summary> /// <param name="objBill"></param> /// <param name="nurseCode"></param> /// <returns></returns> public int UpdateExecBill(Neusoft.FrameWork.Models.NeuObject objBill, string nurseCode) { if (DeleteExecBill(objBill) < 0) { return(-1); } if (InsertExecBill(objBill, nurseCode) <= 0) { return(-1); } return(0); }
public ArrayList GetList(int i) { ArrayList al = new ArrayList(); NeuInfo info = (NeuInfo)alInfo[i]; try { if (this.ExecQuery(info.Sql) == -1) { return(al); } } catch (Exception ex) { this.Logo.WriteLog("执行sql语句出错! " + info.Sql + "错误原因 :" + ex.Message); } try { while (this.Reader.Read()) { Neusoft.FrameWork.Models.NeuObject obj = null; switch (this.Reader.FieldCount) { case 1: obj = new NeuObject(this.Reader[0].ToString(), this.Reader[0].ToString(), ""); break; case 2: obj = new NeuObject(this.Reader[0].ToString(), this.Reader[1].ToString(), ""); break; case 3: obj = new NeuObject(this.Reader[0].ToString(), this.Reader[1].ToString(), this.Reader[2].ToString()); break; default: break; } al.Add(obj); } } catch { }; try { this.Reader.Close(); } catch { } return(al); }
/// <summary> /// 获取病区在院患者和空位病床 /// </summary> protected virtual void GetPatientBedByDept() { Neusoft.FrameWork.WinForms.Classes.Function.ShowWaitForm("正在加载数据,请稍后^^"); Application.DoEvents(); Neusoft.FrameWork.Models.NeuObject deptObj = new Neusoft.FrameWork.Models.NeuObject(); deptObj.ID = cmbDept.Tag.ToString(); deptObj.Name = cmbDept.Text; //患者 RefreshListPatient(deptObj); //病床 GetBedByDeptCode(deptObj); Neusoft.FrameWork.WinForms.Classes.Function.HideWaitForm(); }
private int neuFpEnter1_KeyEnter(Keys key) { if (key != Keys.Enter) { return(1); } if (this.neuFpEnter1_Sheet1.ActiveColumnIndex == 2) { Neusoft.FrameWork.WinForms.Controls.PopUpListBox listBox = this.neuFpEnter1.getCurrentList(this.neuFpEnter1_Sheet1, 2); Neusoft.FrameWork.Models.NeuObject obj = listBox.GetSelectedItem() as Neusoft.FrameWork.Models.NeuObject; this.neuFpEnter1_SetItem(obj); listBox.Visible = false; } return(1); }
/// <summary> /// 为费用类别增加项目{F7FDA08F-F256-4314-84F1-4C9767242D21} /// </summary> private void AddFeeType() { string[] feeType = { "全部", "自费", "医保" }; Neusoft.FrameWork.Models.NeuObject o = null; this.cmbFeeType.ClearItems(); for (int i = 0; i < feeType.Length; i++) { o = new NeuObject(); o.ID = i.ToString(); o.Name = feeType[i]; this.cmbFeeType.Items.Add(o); } this.cmbFeeType.SelectedIndex = 0; }
/// <summary> /// 返回某个节点下的所有 科室列表 /// </summary> /// <param name="ParDeptCode"></param> /// <returns></returns> /// [email protected] public ArrayList GetdistrictForFinance(string ParDeptCode, string statCode) { ArrayList al = new ArrayList(); try { string strSql = ""; if (ParDeptCode == "") { //选择 是何善衡楼 还是住院处 if (this.Sql.GetSql("Manager.DepartmentStatManager.Getdistrict", ref strSql) == -1) { return(null); } } else { //选择 何善衡楼 或住院处 下的明细strSql = string.Format(strSql, class1, deptCode); if (this.Sql.GetSql("Manager.DepartmentStatManager.GetdistrictDetail", ref strSql) == -1) { return(null); } strSql = string.Format(strSql, ParDeptCode, statCode); } if (this.ExecQuery(strSql) < 0) { return(null); } Neusoft.FrameWork.Models.NeuObject obj = null; while (this.Reader.Read()) { obj = new NeuObject(); obj.ID = Reader[0].ToString(); // 科室编码 obj.Name = Reader[1].ToString(); // 科室名称 obj.User01 = Reader[2].ToString(); // 父科室编码 obj.User02 = Reader[3].ToString(); //父科室名称 al.Add(obj); obj = null; } } catch (Exception ee) { this.Err = ee.Message; al = null; } return(al); }
/// <summary> /// 插入系统权限表中一条记录 /// </summary> /// <param name="NeuObject"></param> /// <returns></returns> public int InsertLevel3Meaning(Neusoft.FrameWork.Models.NeuObject NeuObject) { string strSql = ""; if (this.Sql.GetSql("Manager.PowerLevelManager.InsertLevel3Meaning", ref strSql) == -1) { return(-1); } try { strSql = string.Format(strSql, NeuObject.ID, NeuObject.Name, NeuObject.User01, NeuObject.User02, NeuObject.Memo); } catch (Exception ex) { this.Err = ex.Message; this.ErrCode = ex.Message; return(-1); } return(this.ExecNoQuery(strSql)); }
public int SaveReportPrintType(Neusoft.FrameWork.Models.NeuObject type) { int ret = -1; string sqlInsert = "insert into COM_REPORTPRINT_TYPE(ID,NAME) values('{0}','{1}')"; string sqlUpdate = "update COM_REPORTPRINT_TYPE T SET T.NAME='{1}' WHERE T.ID='{0}'"; if (type.ID == string.Empty || type.ID == null) { type.ID = this.GetSequence("GET.SEQ_COM_REPORTPRINT_TYPE"); sqlInsert = string.Format(sqlInsert, type.ID, type.Name); ret = this.ExecNoQuery(sqlInsert); } else { sqlUpdate = string.Format(sqlUpdate, type.ID, type.Name); ret = this.ExecNoQuery(sqlUpdate); } return(ret); }
public List <Neusoft.FrameWork.Models.NeuObject> QueryType() { List <Neusoft.FrameWork.Models.NeuObject> list = new List <Neusoft.FrameWork.Models.NeuObject>(); string sql = "select * from COM_REPORTPRINT_TYPE"; this.ExecQuery(sql); while (this.Reader.Read()) { Neusoft.FrameWork.Models.NeuObject obj = new Neusoft.FrameWork.Models.NeuObject(); obj.ID = this.Reader[0].ToString(); obj.Name = this.Reader[1].ToString(); list.Add(obj); } this.Reader.Close(); return(list); }
/// <summary> /// 生成用户登录日志 /// /// {DEA84BD8-882A-440c-AF5B-3C244D16211D} /// </summary> /// <param name="loginUser">登录用户</param> /// <returns>成功返回1 失败返回-1</returns> public int InsertLoginLog(Neusoft.HISFC.Models.Base.Employee loginUser, string loginSessionID, string ip, string hosName) { string strSql = ""; Neusoft.FrameWork.Models.NeuObject loginSID = this.GetSidAndSerial(hosName); if (this.Sql.GetSql("Manager.UserManager.InsertLoginLog", ref strSql) == -1) { return(-1); } DateTime sysTime = this.GetDateTimeFromSysDateTime(); strSql = System.String.Format(strSql, loginSessionID, loginUser.ID, loginUser.Name, sysTime, loginUser.Dept.ID, loginUser.Dept.Name, //科室信息 loginUser.CurrentGroup.Name, //登录功能组 loginSID.ID, loginSID.Name, //SID/Serial# hosName, ip); return(this.ExecNoQuery(strSql)); }
/// <summary> /// 选中记录 /// </summary> /// <param name="obj"></param> /// <returns></returns> private int neuFpEnter1_SetItem(Neusoft.FrameWork.Models.NeuObject obj) { for (int i = 0; i < this.neuFpEnter1_Sheet1.Rows.Count; i++) { if (this.neuFpEnter1_Sheet1.Cells[i, 1].Text == obj.ID) { MessageBox.Show("该药品性质已经添加"); return(-1); } } int index = this.neuFpEnter1_Sheet1.ActiveRowIndex; if (string.IsNullOrEmpty(this.neuFpEnter1_Sheet1.Cells[index, 1].Text.Trim())) { this.AddNewRow(); } this.neuFpEnter1_Sheet1.Cells[index, 1].Text = obj.ID; this.neuFpEnter1_Sheet1.Cells[index, 2].Text = obj.Name; return(1); }
/// <summary> /// 释放资源 /// </summary> /// <param name="isDisposing"></param> protected override void Dispose(bool isDisposing) { if (this.alreadyDisposed) { return; } if (this.grade2 != null) { this.grade2.Dispose(); this.grade2 = null; } if (this.grade3 != null) { this.grade3.Dispose(); this.grade3 = null; } base.Dispose(isDisposing); this.alreadyDisposed = true; }