/// <summary> /// 修改手术台信息 /// </summary> /// <param name="OpsTable">手术台对象</param> /// <returns>0 success -1 fail</returns> public int UpdateOpsTable(Neusoft.HISFC.Models.Operation.OpsTable OpsTable) { string strSql = string.Empty; string strValid = Neusoft.FrameWork.Function.NConvert.ToInt32(OpsTable.IsValid).ToString(); if (this.Sql.GetSql("Operator.OpsTableManage.UpdateOpsTable.1", ref strSql) == -1) { return(-1); } try { strSql = string.Format(strSql, OpsTable.ID.ToString(), OpsTable.Name, OpsTable.InputCode, OpsTable.Dept.ID.ToString(), OpsTable.RoomID, strValid, OpsTable.Remark, OpsTable.User.ID.ToString()); } catch (Exception ex) { this.Err = ex.Message; this.ErrCode = ex.Message; return(-1); } if (strSql == null) { return(-1); } if (this.ExecNoQuery(strSql) == -1) { return(-1); } return(0); }
public new OpsTable Clone() { OpsTable newOpsTable = base.Clone() as OpsTable; newOpsTable.Dept = this.Dept.Clone(); newOpsTable.User = this.User.Clone(); return(newOpsTable); }
/// <summary> /// 获取指定手术室的手术台列表 /// </summary> /// <param name="OpsRoomID">科室编码</param> /// <returns>手术台对象数组</returns> public ArrayList GetOpsTableByDept(string DeptID) { ArrayList OpsTableAl = new ArrayList(); string strSql = string.Empty; if (this.Sql.GetSql("Operator.OpsTableManage.GetOpsTable.2", ref strSql) == -1) { return(OpsTableAl); } try { strSql = string.Format(strSql, DeptID); } catch (Exception ex) { this.Err = ex.Message; this.ErrCode = ex.Message; return(OpsTableAl); } if (strSql == null) { return(OpsTableAl); } this.ExecQuery(strSql); try { while (this.Reader.Read()) { Neusoft.HISFC.Models.Operation.OpsTable thisTable = new Neusoft.HISFC.Models.Operation.OpsTable(); thisTable.ID = Reader[0].ToString(); //手术台代码 thisTable.Name = Reader[1].ToString(); //手术台名称 thisTable.InputCode = Reader[2].ToString(); //输入码 thisTable.Dept.ID = Reader[3].ToString(); //手术室编码 thisTable.RoomID = Reader[4].ToString(); //手术房间 string strValid = Reader[5].ToString(); //1有效0无效 thisTable.IsValid = Neusoft.FrameWork.Function.NConvert.ToBoolean(strValid); thisTable.Remark = Reader[6].ToString(); //备注 OpsTableAl.Add(thisTable); } } catch (Exception ex) { this.Err = "获得手术台信息出错!" + ex.Message; this.ErrCode = "-1"; this.WriteErr(); return(OpsTableAl); } this.Reader.Close(); return(OpsTableAl); }
/// <summary> /// 向表格中添加一行 /// </summary> /// <param name="table"></param> private void AddItem(Neusoft.HISFC.Models.Operation.OpsTable table) { this.fpSpread1_Sheet1.RowCount++; int index = this.fpSpread1_Sheet1.RowCount - 1; this.fpSpread1_Sheet1.Cells[index, 0].Text = table.Name; this.fpSpread1_Sheet1.Cells[index, 1].Text = table.InputCode; if (table.IsValid) { this.fpSpread1_Sheet1.Cells[index, 2].Text = "在用"; } else { this.fpSpread1_Sheet1.Cells[index, 2].Value = "停用"; } this.fpSpread1_Sheet1.Cells[index, 3].Text = table.Memo; this.fpSpread1_Sheet1.Rows[index].Tag = table; }
/// <summary> /// 添加手术台 /// </summary> /// <param name="table">手术台</param> /// Robin 2007-01-16 public void AddTable(OpsTable table) { table.Room = this; this.tables.Add(table); }