/// <summary> /// 点击确定按钮执行的方法 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> protected void Button1_Click(object sender, EventArgs e) { Maticsoft.BLL.record_FollowUp record_FollowUp_bll = new Maticsoft.BLL.record_FollowUp(); Maticsoft.Model.record_FollowUp record_FollowUp_model = record_FollowUp_bll.GetModel(FollowUpID); if (record_FollowUp_model == null) { record_FollowUp_model = new Maticsoft.Model.record_FollowUp(); } record_FollowUp_model.F_PatientID = (int)Common.sink(this.F_PatientID.UniqueID, MethodType.Post, 255, 0, DataType.Int); record_FollowUp_model.F_Type = Convert.ToInt32(F_Type.SelectedValue); record_FollowUp_model.F_Date = (DateTime)Common.sink(this.F_Date.UniqueID, MethodType.Post, 255, 0, DataType.Dat); record_FollowUp_model.F_Status = Convert.ToInt32(F_Status.SelectedValue); record_FollowUp_model.F_Doctor = UserData.GetUserDate.UserID; switch (CMD) { case "New": CMD_Txt = "增加"; //如果是增加操作,就调用Add方法 record_FollowUp_model.FollowUpID = record_FollowUp_bll.Add(record_FollowUp_model); break; case "Edit": CMD_Txt = "修改"; //如果是修改操作,就调用Update方法 record_FollowUp_bll.Update(record_FollowUp_model); break; } All_Title_Txt = CMD_Txt + App_Txt; //以下方法的第4个参数需要更改 EventMessage.MessageBox(1, "操作成功", string.Format("{1}ID({0})成功!", record_FollowUp_model.FollowUpID, All_Title_Txt), Icon_Type.OK, Common.GetHomeBaseUrl("default.aspx")); }
private void ShowInfo(int FollowUpID) { Maticsoft.BLL.record_FollowUp bll = new Maticsoft.BLL.record_FollowUp(); Maticsoft.Model.record_FollowUp model = bll.GetModel(FollowUpID); this.lblFollowUpID.Text = model.FollowUpID.ToString(); this.lblF_PatientID.Text = model.F_PatientID.ToString(); this.lblF_Type.Text = model.F_Type.ToString(); this.lblF_Date.Text = model.F_Date.ToString(); this.lblF_Status.Text = model.F_Status.ToString(); }
private void ShowInfo(int FollowUpID) { Maticsoft.BLL.record_FollowUp bll=new Maticsoft.BLL.record_FollowUp(); Maticsoft.Model.record_FollowUp model=bll.GetModel(FollowUpID); this.lblFollowUpID.Text=model.FollowUpID.ToString(); this.txtF_PatientID.Text=model.F_PatientID.ToString(); this.txtF_Type.Text=model.F_Type.ToString(); this.txtF_Date.Text=model.F_Date.ToString(); this.txtF_Status.Text=model.F_Status.ToString(); }
protected void Page_Load(object sender, EventArgs e) { if (!Page.IsPostBack) { Maticsoft.BLL.record_FollowUp bll=new Maticsoft.BLL.record_FollowUp(); if (Request.Params["id"] != null && Request.Params["id"].Trim() != "") { int FollowUpID=(Convert.ToInt32(Request.Params["id"])); bll.Delete(FollowUpID); Response.Redirect("list.aspx"); } } }
protected void Page_Load(object sender, EventArgs e) { if (!Page.IsPostBack) { Maticsoft.BLL.record_FollowUp bll = new Maticsoft.BLL.record_FollowUp(); if (Request.Params["id"] != null && Request.Params["id"].Trim() != "") { int FollowUpID = (Convert.ToInt32(Request.Params["id"])); bll.Delete(FollowUpID); Response.Redirect("list.aspx"); } } }
public void btnSave_Click(object sender, EventArgs e) { string strErr = ""; if (!PageValidate.IsNumber(txtF_PatientID.Text)) { strErr += "病人ID格式错误!\\n"; } if (!PageValidate.IsNumber(txtF_Type.Text)) { strErr += "随访类型格式错误!\\n"; } if (!PageValidate.IsDateTime(txtF_Date.Text)) { strErr += "下次随访日期格式错误!\\n"; } if (!PageValidate.IsNumber(txtF_Status.Text)) { strErr += "随访状态 1:为完成格式错误!\\n"; } if (strErr != "") { MessageBox.Show(this, strErr); return; } int FollowUpID = int.Parse(this.lblFollowUpID.Text); int F_PatientID = int.Parse(this.txtF_PatientID.Text); int F_Type = int.Parse(this.txtF_Type.Text); DateTime F_Date = DateTime.Parse(this.txtF_Date.Text); int F_Status = int.Parse(this.txtF_Status.Text); Maticsoft.Model.record_FollowUp model = new Maticsoft.Model.record_FollowUp(); model.FollowUpID = FollowUpID; model.F_PatientID = F_PatientID; model.F_Type = F_Type; model.F_Date = F_Date; model.F_Status = F_Status; Maticsoft.BLL.record_FollowUp bll = new Maticsoft.BLL.record_FollowUp(); bll.Update(model); Maticsoft.Common.MessageBox.ShowAndRedirect(this, "保存成功!", "list.aspx"); }
public void btnSave_Click(object sender, EventArgs e) { string strErr=""; if(!PageValidate.IsNumber(txtF_PatientID.Text)) { strErr+="病人ID格式错误!\\n"; } if(!PageValidate.IsNumber(txtF_Type.Text)) { strErr+="随访类型格式错误!\\n"; } if(!PageValidate.IsDateTime(txtF_Date.Text)) { strErr+="下次随访日期格式错误!\\n"; } if(!PageValidate.IsNumber(txtF_Status.Text)) { strErr+="随访状态 1:为完成格式错误!\\n"; } if(strErr!="") { MessageBox.Show(this,strErr); return; } int FollowUpID=int.Parse(this.lblFollowUpID.Text); int F_PatientID=int.Parse(this.txtF_PatientID.Text); int F_Type=int.Parse(this.txtF_Type.Text); DateTime F_Date=DateTime.Parse(this.txtF_Date.Text); int F_Status=int.Parse(this.txtF_Status.Text); Maticsoft.Model.record_FollowUp model=new Maticsoft.Model.record_FollowUp(); model.FollowUpID=FollowUpID; model.F_PatientID=F_PatientID; model.F_Type=F_Type; model.F_Date=F_Date; model.F_Status=F_Status; Maticsoft.BLL.record_FollowUp bll=new Maticsoft.BLL.record_FollowUp(); bll.Update(model); Maticsoft.Common.MessageBox.ShowAndRedirect(this,"保存成功!","list.aspx"); }
/// <summary> /// 在编辑的时候将对应的值绑定到Label上 /// </summary> private void InputData() { Maticsoft.BLL.record_FollowUp record_FollowUp_bll = new Maticsoft.BLL.record_FollowUp(); Maticsoft.Model.record_FollowUp record_FollowUp_model = record_FollowUp_bll.GetModel(FollowUpID); if (record_FollowUp_model != null) { F_PatientID.Value = record_FollowUp_model.F_PatientID +""; Maticsoft.BLL.sys_User sys_User_bll = new Maticsoft.BLL.sys_User(); F_PatientID_input.Text = sys_User_bll.GetModel(record_FollowUp_model.F_PatientID).U_CName; F_Type.SelectedValue = record_FollowUp_model.F_Type + ""; F_Date.Text = record_FollowUp_model.F_Date.ToShortDateString(); F_Status.SelectedValue = record_FollowUp_model.F_Status + ""; } }
/// <summary> /// 初始化 /// </summary> private void OnStart() { if (CMD == "New") { } else if (CMD == "Edit") { HeadMenuButtonItem bi2 = new HeadMenuButtonItem(); bi2.ButtonPopedom = PopedomType.Delete; bi2.ButtonName = "计划"; bi2.ButtonUrlType = UrlType.JavaScript; bi2.ButtonUrl = string.Format("DelData('?CMD=Delete&ActivityID={0}')", FollowUpID); HeadMenuWebControls1.ButtonList.Add(bi2); InputData(); } else if (CMD == "Delete") { Maticsoft.BLL.record_FollowUp bll = new Maticsoft.BLL.record_FollowUp(); Maticsoft.Model.record_FollowUp model = bll.GetModel(FollowUpID); bll.Delete(model.FollowUpID); EventMessage.MessageBox(1, "操作成功", string.Format("{1}ID({0})成功!", FollowUpID, "删除信息"), Icon_Type.OK, Common.GetHomeBaseUrl("default.aspx")); } }
/// <summary> /// ������� /// </summary> private void BindData() { string orderby = OrderType == 0 ? Orderfld + " asc" : Orderfld + " desc"; int startIndex = (this.AspNetPager1.CurrentPageIndex - 1) * this.AspNetPager1.PageSize + 1; int endIndex = this.AspNetPager1.CurrentPageIndex * this.AspNetPager1.PageSize; Maticsoft.BLL.record_FollowUp bll = new Maticsoft.BLL.record_FollowUp(); DataSet datas = bll.GetListByPage(SearchTerms, orderby, startIndex, endIndex); GridView1.DataSource = datas; GridView1.DataBind(); this.AspNetPager1.RecordCount = bll.GetRecordCount(SearchTerms); }
/// <summary> /// ��ȡ״̬ /// </summary> /// <param name="superision_type"></param> /// <returns></returns> public string getStatusName(int FollowUpID, int F_Status) { string name = ""; switch (F_Status) { case 1: name = "δ���"; Maticsoft.BLL.record_FollowUp record_FollowUp_bll = new Maticsoft.BLL.record_FollowUp(); Maticsoft.Model.record_FollowUp record_FollowUp_model = record_FollowUp_bll.GetModel(FollowUpID); if (record_FollowUp_model !=null) { if (string.Compare(DateTime.Now.ToShortDateString(), record_FollowUp_model.F_Date.ToShortDateString()) == 1) { record_FollowUp_model.F_Status = 3; //δ��ɵ���Ŀ�ѹ��� record_FollowUp_bll.Update(record_FollowUp_model); name = "�ѵ���"; } } break; case 2: name = "�����"; break; case 3: name = "�ѵ���"; break; } return name; }