Exemple #1
0
        public void btnSave_Click(object sender, EventArgs e)
        {
            string strErr = "";

            if (!PageValidate.IsDateTime(txtD_DateTime.Text))
            {
                strErr += "D_DateTime格式错误!\\n";
            }
            if (this.txtD_Location.Text.Trim().Length == 0)
            {
                strErr += "D_Location不能为空!\\n";
            }
            if (!PageValidate.IsNumber(txtD_Icd10ID.Text))
            {
                strErr += "疾病icd10编码格式错误!\\n";
            }
            if (this.txtD_Note.Text.Trim().Length == 0)
            {
                strErr += "死亡说明不能为空!\\n";
            }
            if (!PageValidate.IsNumber(txtD_UserID.Text))
            {
                strErr += "登记人,与sys_User表的格式错误!\\n";
            }
            if (!PageValidate.IsDateTime(txtD_RegDate.Text))
            {
                strErr += "登记日期格式错误!\\n";
            }

            if (strErr != "")
            {
                MessageBox.Show(this, strErr);
                return;
            }
            int      DeathID    = int.Parse(this.lblDeathID.Text);
            DateTime D_DateTime = DateTime.Parse(this.txtD_DateTime.Text);
            string   D_Location = this.txtD_Location.Text;
            int      D_Icd10ID  = int.Parse(this.txtD_Icd10ID.Text);
            string   D_Note     = this.txtD_Note.Text;
            int      D_UserID   = int.Parse(this.txtD_UserID.Text);
            DateTime D_RegDate  = DateTime.Parse(this.txtD_RegDate.Text);


            Maticsoft.Model.record_DeathRegistration model = new Maticsoft.Model.record_DeathRegistration();
            model.DeathID    = DeathID;
            model.D_DateTime = D_DateTime;
            model.D_Location = D_Location;
            model.D_Icd10ID  = D_Icd10ID;
            model.D_Note     = D_Note;
            model.D_UserID   = D_UserID;
            model.D_RegDate  = D_RegDate;

            Maticsoft.BLL.record_DeathRegistration bll = new Maticsoft.BLL.record_DeathRegistration();
            bll.Update(model);
            Maticsoft.Common.MessageBox.ShowAndRedirect(this, "保存成功!", "list.aspx");
        }
Exemple #2
0
        public void btnSave_Click(object sender, EventArgs e)
        {
            string strErr="";
            if(!PageValidate.IsDateTime(txtD_DateTime.Text))
            {
                strErr+="D_DateTime格式错误!\\n";
            }
            if(this.txtD_Location.Text.Trim().Length==0)
            {
                strErr+="D_Location不能为空!\\n";
            }
            if(!PageValidate.IsNumber(txtD_Icd10ID.Text))
            {
                strErr+="疾病icd10编码格式错误!\\n";
            }
            if(this.txtD_Note.Text.Trim().Length==0)
            {
                strErr+="死亡说明不能为空!\\n";
            }
            if(!PageValidate.IsNumber(txtD_UserID.Text))
            {
                strErr+="登记人,与sys_User表的格式错误!\\n";
            }
            if(!PageValidate.IsDateTime(txtD_RegDate.Text))
            {
                strErr+="登记日期格式错误!\\n";
            }

            if(strErr!="")
            {
                MessageBox.Show(this,strErr);
                return;
            }
            int DeathID=int.Parse(this.lblDeathID.Text);
            DateTime D_DateTime=DateTime.Parse(this.txtD_DateTime.Text);
            string D_Location=this.txtD_Location.Text;
            int D_Icd10ID=int.Parse(this.txtD_Icd10ID.Text);
            string D_Note=this.txtD_Note.Text;
            int D_UserID=int.Parse(this.txtD_UserID.Text);
            DateTime D_RegDate=DateTime.Parse(this.txtD_RegDate.Text);

            Maticsoft.Model.record_DeathRegistration model=new Maticsoft.Model.record_DeathRegistration();
            model.DeathID=DeathID;
            model.D_DateTime=D_DateTime;
            model.D_Location=D_Location;
            model.D_Icd10ID=D_Icd10ID;
            model.D_Note=D_Note;
            model.D_UserID=D_UserID;
            model.D_RegDate=D_RegDate;

            Maticsoft.BLL.record_DeathRegistration bll=new Maticsoft.BLL.record_DeathRegistration();
            bll.Update(model);
            Maticsoft.Common.MessageBox.ShowAndRedirect(this,"保存成功!","list.aspx");
        }
Exemple #3
0
 private void ShowInfo(int DeathID)
 {
     Maticsoft.BLL.record_DeathRegistration   bll   = new Maticsoft.BLL.record_DeathRegistration();
     Maticsoft.Model.record_DeathRegistration model = bll.GetModel(DeathID);
     this.lblDeathID.Text    = model.DeathID.ToString();
     this.lblD_DateTime.Text = model.D_DateTime.ToString();
     this.lblD_Location.Text = model.D_Location;
     this.lblD_Icd10ID.Text  = model.D_Icd10ID.ToString();
     this.lblD_Note.Text     = model.D_Note;
     this.lblD_UserID.Text   = model.D_UserID.ToString();
     this.lblD_RegDate.Text  = model.D_RegDate.ToString();
 }
Exemple #4
0
 private void ShowInfo(int DeathID)
 {
     Maticsoft.BLL.record_DeathRegistration bll=new Maticsoft.BLL.record_DeathRegistration();
     Maticsoft.Model.record_DeathRegistration model=bll.GetModel(DeathID);
     this.lblDeathID.Text=model.DeathID.ToString();
     this.lblD_DateTime.Text=model.D_DateTime.ToString();
     this.lblD_Location.Text=model.D_Location;
     this.lblD_Icd10ID.Text=model.D_Icd10ID.ToString();
     this.lblD_Note.Text=model.D_Note;
     this.lblD_UserID.Text=model.D_UserID.ToString();
     this.lblD_RegDate.Text=model.D_RegDate.ToString();
 }
Exemple #5
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!Page.IsPostBack)
     {
         Maticsoft.BLL.record_DeathRegistration bll=new Maticsoft.BLL.record_DeathRegistration();
         if (Request.Params["id"] != null && Request.Params["id"].Trim() != "")
         {
             int DeathID=(Convert.ToInt32(Request.Params["id"]));
             bll.Delete(DeathID);
             Response.Redirect("list.aspx");
         }
     }
 }
Exemple #6
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!Page.IsPostBack)
     {
         Maticsoft.BLL.record_DeathRegistration bll = new Maticsoft.BLL.record_DeathRegistration();
         if (Request.Params["id"] != null && Request.Params["id"].Trim() != "")
         {
             int DeathID = (Convert.ToInt32(Request.Params["id"]));
             bll.Delete(DeathID);
             Response.Redirect("list.aspx");
         }
     }
 }
Exemple #7
0
        /// <summary>
        /// 点击确定按钮执行的方法
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void Button1_Click(object sender, EventArgs e)
        {
            Maticsoft.BLL.record_DeathRegistration supervision_bll = new Maticsoft.BLL.record_DeathRegistration();
            Maticsoft.Model.record_DeathRegistration record_DeathRegistration_model = supervision_bll.GetModel(DeathID);
            if (record_DeathRegistration_model == null)
            {
                record_DeathRegistration_model = new Maticsoft.Model.record_DeathRegistration();
            }

            //获取客户端通过Post方式传递过来的值的
            record_DeathRegistration_model.D_DateTime = (DateTime)Common.sink(this.D_DateTime.UniqueID, MethodType.Post, 255, 0, DataType.Dat);
            record_DeathRegistration_model.D_Reason = (string)Common.sink(this.D_Reason.UniqueID, MethodType.Post, 0, 0, DataType.Str);
            record_DeathRegistration_model.D_Location = (string)Common.sink(this.D_Location.UniqueID, MethodType.Post, 0, 0, DataType.Str);
            record_DeathRegistration_model.D_RegDate = (DateTime)Common.sink(this.D_RegDate.UniqueID, MethodType.Post, 0, 0, DataType.Dat);
            record_DeathRegistration_model.D_UserID = Convert.ToInt32(this.D_UserID.Value);
            record_DeathRegistration_model.D_RegUserID = Convert.ToInt32(this.D_RegUserID.Value);

            switch (CMD)
            {
                case "New":
                    CMD_Txt = "增加";
                    //增加操作调用Add方法
                    record_DeathRegistration_model.DeathID = supervision_bll.Add(record_DeathRegistration_model);
                    if(record_DeathRegistration_model.DeathID > 0)
                    {
                        Maticsoft.BLL.record_UserBaseInfo record_UserBaseInfo_bll = new Maticsoft.BLL.record_UserBaseInfo();
                        Maticsoft.Model.record_UserBaseInfo record_UserBaseInfo_model = record_UserBaseInfo_bll.GetModel(record_DeathRegistration_model.D_UserID);
                        record_UserBaseInfo_model.U_AuditStatus = 3;
                        record_UserBaseInfo_bll.Update(record_UserBaseInfo_model);
                    }
                    break;
                case "Edit":
                    CMD_Txt = "修改";
                    //修改操作调用Update方法
                    supervision_bll.Update(record_DeathRegistration_model);
                    break;
            }
            All_Title_Txt = CMD_Txt + App_Txt;
            EventMessage.MessageBox(1, "操作成功", string.Format("{1}ID({0})成功!", record_DeathRegistration_model.DeathID, All_Title_Txt), Icon_Type.OK, Common.GetHomeBaseUrl("default.aspx"));
        }
Exemple #8
0
        /// <summary>
        /// 在编辑的时候将对应的值绑定到Label上
        /// </summary>
        private void InputData()
        {
            Maticsoft.BLL.record_DeathRegistration bll = new Maticsoft.BLL.record_DeathRegistration();
            Maticsoft.Model.record_DeathRegistration model = bll.GetModel(DeathID);

            D_DateTime.Text = model.D_DateTime.ToShortDateString();
            D_Reason.Text = model.D_Reason;
            D_Location.Text = model.D_Location;
            D_RegDate.Text = model.D_RegDate.ToShortDateString();
            Maticsoft.BLL.sys_User user_bll = new Maticsoft.BLL.sys_User();
            Maticsoft.Model.sys_User user_model = user_bll.GetModel(model.D_UserID);
            D_UserID.Value = user_model.UserID + "";
            D_UserID_input.Value = user_model.U_CName;
            user_model = user_bll.GetModel(model.D_RegUserID);
            D_RegUserID.Value = user_model.UserID + "";
            D_RegUserID_input.Value = user_model.U_CName;
        }
Exemple #9
0
        /// <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&DeathID={0}')", DeathID);
                HeadMenuWebControls1.ButtonList.Add(bi2);

                InputData();
            }
            else if (CMD == "Delete")
            {
                Maticsoft.BLL.record_DeathRegistration bll = new Maticsoft.BLL.record_DeathRegistration();
                Maticsoft.Model.record_DeathRegistration model = bll.GetModel(DeathID);
                bll.Delete(model.DeathID);
                EventMessage.MessageBox(1, "操作成功", string.Format("{1}ID({0})成功!", DeathID, "删除信息"), Icon_Type.OK, Common.GetHomeBaseUrl("default.aspx"));
            }
        }
Exemple #10
0
        /// <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_DeathRegistration bll = new Maticsoft.BLL.record_DeathRegistration();

            //bllͨ������GetListByPage�������ط�ҳ����
            DataSet datas = bll.GetListByPage(SearchTerms, orderby, startIndex, endIndex);
            GridView1.DataSource = datas;
            GridView1.DataBind();
            //��ȡ�ܼ�¼��
            this.AspNetPager1.RecordCount = bll.GetRecordCount(SearchTerms);
        }