protected void btnSave_Click(object sender, EventArgs e) { string strErr=""; if(this.txtM_Time.Text.Trim().Length==0) { strErr+="服药时间点(24小时制不能为空!\\n"; } if(!PageValidate.IsNumber(txtMedicationID.Text)) { strErr+="与record_Medicat格式错误!\\n"; } if(strErr!="") { MessageBox.Show(this,strErr); return; } string M_Time=this.txtM_Time.Text; int MedicationID=int.Parse(this.txtMedicationID.Text); Maticsoft.Model.record_MedicationTime model=new Maticsoft.Model.record_MedicationTime(); model.M_Time=M_Time; model.MedicationID=MedicationID; Maticsoft.BLL.record_MedicationTime bll=new Maticsoft.BLL.record_MedicationTime(); bll.Add(model); Maticsoft.Common.MessageBox.ShowAndRedirect(this,"保存成功!","add.aspx"); }
protected void btnSave_Click(object sender, EventArgs e) { string strErr = ""; if (this.txtM_Time.Text.Trim().Length == 0) { strErr += "服药时间点(24小时制不能为空!\\n"; } if (!PageValidate.IsNumber(txtMedicationID.Text)) { strErr += "与record_Medicat格式错误!\\n"; } if (strErr != "") { MessageBox.Show(this, strErr); return; } string M_Time = this.txtM_Time.Text; int MedicationID = int.Parse(this.txtMedicationID.Text); Maticsoft.Model.record_MedicationTime model = new Maticsoft.Model.record_MedicationTime(); model.M_Time = M_Time; model.MedicationID = MedicationID; Maticsoft.BLL.record_MedicationTime bll = new Maticsoft.BLL.record_MedicationTime(); bll.Add(model); Maticsoft.Common.MessageBox.ShowAndRedirect(this, "保存成功!", "add.aspx"); }
private void ShowInfo(int MedicationTimeID) { Maticsoft.BLL.record_MedicationTime bll = new Maticsoft.BLL.record_MedicationTime(); Maticsoft.Model.record_MedicationTime model = bll.GetModel(MedicationTimeID); this.lblMedicationTimeID.Text = model.MedicationTimeID.ToString(); this.lblM_Time.Text = model.M_Time; this.lblMedicationID.Text = model.MedicationID.ToString(); }
private void ShowInfo(int MedicationTimeID) { Maticsoft.BLL.record_MedicationTime bll=new Maticsoft.BLL.record_MedicationTime(); Maticsoft.Model.record_MedicationTime model=bll.GetModel(MedicationTimeID); this.lblMedicationTimeID.Text=model.MedicationTimeID.ToString(); this.lblM_Time.Text=model.M_Time; this.lblMedicationID.Text=model.MedicationID.ToString(); }
protected void Page_Load(object sender, EventArgs e) { if (!Page.IsPostBack) { Maticsoft.BLL.record_MedicationTime bll=new Maticsoft.BLL.record_MedicationTime(); if (Request.Params["id"] != null && Request.Params["id"].Trim() != "") { int MedicationTimeID=(Convert.ToInt32(Request.Params["id"])); bll.Delete(MedicationTimeID); Response.Redirect("list.aspx"); } } }
protected void Page_Load(object sender, EventArgs e) { if (!Page.IsPostBack) { Maticsoft.BLL.record_MedicationTime bll = new Maticsoft.BLL.record_MedicationTime(); if (Request.Params["id"] != null && Request.Params["id"].Trim() != "") { int MedicationTimeID = (Convert.ToInt32(Request.Params["id"])); bll.Delete(MedicationTimeID); Response.Redirect("list.aspx"); } } }