Ejemplo n.º 1
0
        /// <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"));
        }
Ejemplo n.º 2
0
        protected 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      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.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.Add(model);
            Maticsoft.Common.MessageBox.ShowAndRedirect(this, "保存成功!", "add.aspx");
        }
Ejemplo n.º 3
0
        protected 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 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.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.Add(model);
            Maticsoft.Common.MessageBox.ShowAndRedirect(this,"保存成功!","add.aspx");
        }