public string AddApplyDoctor(string strDBMethod, ApplyDoctorInfo applyDoctorInfo) { string strInfo = string.Empty; try { int count = myBatis.SelectApplyDoctor("SelectApplyDoctorInfo", applyDoctorInfo); // 当count>0代表已存在此项目 if (count <= 0) { myBatis.AddApplyDoctor(strDBMethod, applyDoctorInfo); count = myBatis.SelectApplyDoctor("SelectApplyDoctorInfo", applyDoctorInfo); if (count > 0) { strInfo = "申请医生创建成功!"; } else { strInfo = "申请医生创建失败,请联系管理员!"; } } else { strInfo = "该申请医生已存在,请重新录入。"; } } catch (Exception e) { LogInfo.WriteErrorLog("DataConfigAdd(string strDBMethod, string dataConfig)==" + e.ToString(), Module.WindowsService); } return(strInfo); }
public void AddApplyDoctor(string strDBMethod, ApplyDoctorInfo applyDoctorInfo) { Hashtable hashTable = new Hashtable(); hashTable.Add("Department", applyDoctorInfo.Department); hashTable.Add("Doctor", applyDoctorInfo.Doctor); try { ism_SqlMap.Insert("DepartmentInfo." + strDBMethod, hashTable); } catch (Exception e) { LogInfo.WriteErrorLog("AddDataConfig(string strDBMethod, CalcProjectInfo calcProjectInfo)==" + e.ToString(), Module.System); } }
/// <summary> /// 修改申请医生(保存按钮) /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void simpleButton2_Click(object sender, EventArgs e) { if (this.gridView2.GetSelectedRows().Count() > 0) { ApplyDoctorInfo applyDoctorInfo = new ApplyDoctorInfo(); applyDoctorInfo.Department = ComBoxDepartment.Text; applyDoctorInfo.Doctor = TxtDoctorName.Text; dePartManageDic.Clear(); dePartManageDic.Add("UpdataApplyDoctorInfo", new object[] { XmlUtility.Serializer(typeof(ApplyDoctorInfo), applyDoctorInfo), XmlUtility.Serializer(typeof(ApplyDoctorInfo), applyDoctorInfoOld) }); DepartmentManageSend(dePartManageDic); TxtDoctorName.Text = ""; } else { MessageBoxDraw.ShowMsg("没有可修改的申请医师,无法进行修改!", MsgType.OK); } }
public int DeleteApplyDoctorInfo(string strDBMethod, ApplyDoctorInfo applyDoctorInfo) { int intResult = 0; try { Hashtable hashTable = new Hashtable(); hashTable.Add("Department", applyDoctorInfo.Department); hashTable.Add("Doctor", applyDoctorInfo.Doctor); intResult = (int)ism_SqlMap.Delete("DepartmentInfo." + strDBMethod, hashTable); } catch (Exception e) { LogInfo.WriteErrorLog("DeleteDataConfig(string strDBMethod, string dataConfig)==" + e.ToString(), Module.System); } return(intResult); }
/// <summary> /// 申请医生(添加按钮) /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void simpleButton4_Click(object sender, EventArgs e) { if (TxtDoctorName.Text.Trim() == "") { MessageBoxDraw.ShowMsg("请输入申请医师名称!", MsgType.OK); return; } if (ComBoxDepartment.SelectedIndex < 0) { MessageBoxDraw.ShowMsg("请选择申请科室!", MsgType.OK); return; } ApplyDoctorInfo applyDoctorInfo = new ApplyDoctorInfo(); applyDoctorInfo.Department = ComBoxDepartment.Text; applyDoctorInfo.Doctor = TxtDoctorName.Text; dePartManageDic.Clear(); dePartManageDic.Add("AddApplyDoctorInfo", new object[] { XmlUtility.Serializer(typeof(ApplyDoctorInfo), applyDoctorInfo) }); DepartmentManageSend(dePartManageDic); }
/// <summary> /// 审核医生(删除按钮) /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void simpleButton1_Click(object sender, EventArgs e) { if (gridView2.GetSelectedRows().Count() > 0) { DialogResult yesorno = MessageBoxDraw.ShowMsg("是否确认删除", MsgType.YesNo); if (yesorno == DialogResult.No) { return; } ApplyDoctorInfo applyDoctorInfo = new ApplyDoctorInfo(); int selectedHandle; selectedHandle = this.gridView2.GetSelectedRows()[0]; applyDoctorInfo.Doctor = this.gridView2.GetRowCellValue(selectedHandle, "医生名称").ToString(); applyDoctorInfo.Department = this.gridView2.GetRowCellValue(selectedHandle, "申请科室").ToString(); dePartManageDic.Clear(); dePartManageDic.Add("DeleteApplyDoctorInfo", new object[] { XmlUtility.Serializer(typeof(ApplyDoctorInfo), applyDoctorInfo) }); DepartmentManageSend(dePartManageDic); } }
public int UpdataApplyDoctorInfo(string strDBMethod, ApplyDoctorInfo applyDoctorInfo, ApplyDoctorInfo applyDoctorInfoOld) { int intResult = 0; try { Hashtable hashTable = new Hashtable(); hashTable.Add("Department", applyDoctorInfo.Department); hashTable.Add("Doctor", applyDoctorInfo.Doctor); hashTable.Add("DepartmentOld", applyDoctorInfoOld.Department); hashTable.Add("DoctorOld", applyDoctorInfoOld.Doctor); intResult = (int)ism_SqlMap.Update("DepartmentInfo." + strDBMethod, hashTable); LogInfo.WriteProcessLog(strDBMethod + "zhuszihe33" + intResult, Module.WindowsService); } catch (Exception e) { LogInfo.WriteErrorLog("UpdateDataConfig(string strDBMethod, string dataConfig, string dataConfigOld)==" + e.ToString(), Module.System); } return(intResult); }
public int UpdataApplyDoctorInfo(string strDBMethod, ApplyDoctorInfo applyDoctorInfo, ApplyDoctorInfo applyDoctorInfoOld) { return(myBatis.UpdataApplyDoctorInfo(strDBMethod, applyDoctorInfo, applyDoctorInfoOld)); }
public int DeleteApplyDoctorInfo(string strDBMethod, ApplyDoctorInfo applyDoctorInfo) { return(myBatis.DeleteApplyDoctorInfo(strDBMethod, applyDoctorInfo)); }