Example #1
0
 private void ShowInfo(int UserID)
 {
     Maticsoft.BLL.sys_User   bll   = new Maticsoft.BLL.sys_User();
     Maticsoft.Model.sys_User model = bll.GetModel(UserID);
     this.lblUserID.Text            = model.UserID.ToString();
     this.txtU_LoginName.Text       = model.U_LoginName;
     this.txtU_Password.Text        = model.U_Password;
     this.txtU_CName.Text           = model.U_CName;
     this.txtU_EName.Text           = model.U_EName;
     this.txtU_GroupID.Text         = model.U_GroupID.ToString();
     this.txtU_Email.Text           = model.U_Email;
     this.txtU_Type.Text            = model.U_Type.ToString();
     this.txtU_Status.Text          = model.U_Status.ToString();
     this.txtU_Licence.Text         = model.U_Licence;
     this.txtU_Mac.Text             = model.U_Mac;
     this.txtU_Remark.Text          = model.U_Remark;
     this.txtU_IDCard.Text          = model.U_IDCard;
     this.txtU_Sex.Text             = model.U_Sex.ToString();
     this.txtU_BirthDay.Text        = model.U_BirthDay.ToString();
     this.txtU_MobileNo.Text        = model.U_MobileNo;
     this.txtU_UserNO.Text          = model.U_UserNO;
     this.txtU_WorkStartDate.Text   = model.U_WorkStartDate.ToString();
     this.txtU_WorkEndDate.Text     = model.U_WorkEndDate.ToString();
     this.txtU_CompanyMail.Text     = model.U_CompanyMail;
     this.txtU_Title.Text           = model.U_Title.ToString();
     this.txtU_Extension.Text       = model.U_Extension;
     this.txtU_HomeTel.Text         = model.U_HomeTel;
     this.txtU_PhotoUrl.Text        = model.U_PhotoUrl;
     this.txtU_DateTime.Text        = model.U_DateTime.ToString();
     this.txtU_LastIP.Text          = model.U_LastIP;
     this.txtU_LastDateTime.Text    = model.U_LastDateTime.ToString();
     this.txtU_ExtendField.Text     = model.U_ExtendField;
     this.txtU_LoginType.Text       = model.U_LoginType;
     this.txtU_HospitalGroupID.Text = model.U_HospitalGroupID.ToString();
 }
Example #2
0
 private void ShowInfo(int UserID)
 {
     Maticsoft.BLL.sys_User bll=new Maticsoft.BLL.sys_User();
     Maticsoft.Model.sys_User model=bll.GetModel(UserID);
     this.lblUserID.Text=model.UserID.ToString();
     this.lblU_LoginName.Text=model.U_LoginName;
     this.lblU_Password.Text=model.U_Password;
     this.lblU_CName.Text=model.U_CName;
     this.lblU_EName.Text=model.U_EName;
     this.lblU_GroupID.Text=model.U_GroupID.ToString();
     this.lblU_Email.Text=model.U_Email;
     this.lblU_Type.Text=model.U_Type.ToString();
     this.lblU_Status.Text=model.U_Status.ToString();
     this.lblU_Licence.Text=model.U_Licence;
     this.lblU_Mac.Text=model.U_Mac;
     this.lblU_Remark.Text=model.U_Remark;
     this.lblU_IDCard.Text=model.U_IDCard;
     this.lblU_Sex.Text=model.U_Sex.ToString();
     this.lblU_BirthDay.Text=model.U_BirthDay.ToString();
     this.lblU_MobileNo.Text=model.U_MobileNo;
     this.lblU_UserNO.Text=model.U_UserNO;
     this.lblU_WorkStartDate.Text=model.U_WorkStartDate.ToString();
     this.lblU_WorkEndDate.Text=model.U_WorkEndDate.ToString();
     this.lblU_CompanyMail.Text=model.U_CompanyMail;
     this.lblU_Title.Text=model.U_Title.ToString();
     this.lblU_Extension.Text=model.U_Extension;
     this.lblU_HomeTel.Text=model.U_HomeTel;
     this.lblU_PhotoUrl.Text=model.U_PhotoUrl;
     this.lblU_DateTime.Text=model.U_DateTime.ToString();
     this.lblU_LastIP.Text=model.U_LastIP;
     this.lblU_LastDateTime.Text=model.U_LastDateTime.ToString();
     this.lblU_ExtendField.Text=model.U_ExtendField;
     this.lblU_LoginType.Text=model.U_LoginType;
     this.lblU_HospitalGroupID.Text=model.U_HospitalGroupID.ToString();
 }
Example #3
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.sys_User bll = new Maticsoft.BLL.sys_User();
            DataSet datas = bll.GetListByPage(SearchTerms, orderby, startIndex, endIndex);

            GridView1.DataSource = datas;
            GridView1.DataBind();
            this.AspNetPager1.RecordCount = bll.GetRecordCount(SearchTerms);
        }
Example #4
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!Page.IsPostBack)
     {
         Maticsoft.BLL.sys_User bll=new Maticsoft.BLL.sys_User();
         if (Request.Params["id"] != null && Request.Params["id"].Trim() != "")
         {
             int UserID=(Convert.ToInt32(Request.Params["id"]));
             bll.Delete(UserID);
             Response.Redirect("list.aspx");
         }
     }
 }
Example #5
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!Page.IsPostBack)
     {
         Maticsoft.BLL.sys_User bll = new Maticsoft.BLL.sys_User();
         if (Request.Params["id"] != null && Request.Params["id"].Trim() != "")
         {
             int UserID = (Convert.ToInt32(Request.Params["id"]));
             bll.Delete(UserID);
             Response.Redirect("list.aspx");
         }
     }
 }
Example #6
0
        /// <summary>
        /// ��ʼ��
        /// </summary>
        private void OnStart()
        {
            if (CMD == "Edit")
            {
                BindButton();

                Maticsoft.BLL.sys_User sys_User_bll = new Maticsoft.BLL.sys_User();
                Maticsoft.Model.sys_User sys_User_model = sys_User_bll.GetModel(UserID);
                Maticsoft.BLL.record_UserBaseInfo record_UserBaseInfo_bll = new Maticsoft.BLL.record_UserBaseInfo();
                Maticsoft.Model.record_UserBaseInfo record_UserBaseInfo_model = record_UserBaseInfo_bll.GetModel(UserID);
                U_IDCard.Text = sys_User_model.U_IDCard;
                U_CName.Text = sys_User_model.U_CName;
                U_ResponsibilityUserID.Text = sys_User_bll.GetModel(record_UserBaseInfo_model.U_ResponsibilityUserID).U_CName;
            }
        }
Example #7
0
        /// <summary>
        /// 在编辑的时候将对应的值绑定到Label上
        /// </summary>
        private void InputData()
        {
            //这两句和73、75作用一样
            Maticsoft.BLL.supervision_Info   bll   = new Maticsoft.BLL.supervision_Info();
            Maticsoft.Model.supervision_Info model = bll.GetModel(InfoID);

            //以下几行需要更改
            this.I_FindDate.Text      = this.I_FindDate_Txt.Text = model.I_FindDate.ToShortDateString();
            this.I_Type.SelectedValue = model.I_Type + "";
            this.I_Type_Txt.Text      = getSuperisionNameByType(model.I_Type);
            this.I_Content.Text       = this.I_Content_Txt.Text = model.I_Content;
            this.I_ReportDate.Text    = this.I_ReportDate.Text = model.I_ReportDate.ToShortDateString();
            Maticsoft.BLL.sys_User   user_bll   = new Maticsoft.BLL.sys_User();
            Maticsoft.Model.sys_User user_model = user_bll.GetModel(model.I_ReportUserID);
            this.I_ReportUserID.Value        = user_model.UserID + "";
            this.I_ReportUserID_TextBox.Text = user_model.U_CName;
        }
Example #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;
        }
Example #9
0
        /// <summary>
        /// 在编辑的时候将对应的值绑定到Label上
        /// </summary>
        private void InputData()
        {
            //这两句和71、73作用一样
            Maticsoft.BLL.supervision_Info bll = new Maticsoft.BLL.supervision_Info();
            Maticsoft.Model.supervision_Info model = bll.GetModel(InfoID);

            //以下几行需要更改
            I_FindDate.Text = model.I_FindDate.ToShortDateString();
            I_Type.SelectedValue = model.I_Type+"";
            I_Content.Text = model.I_Content;
            I_ReportDate.Text = model.I_ReportDate.ToShortDateString();
            Maticsoft.BLL.sys_User user_bll = new Maticsoft.BLL.sys_User();
            Maticsoft.Model.sys_User user_model = user_bll.GetModel(model.I_ReportUserID);
            I_ReportUserID.Value = user_model.UserID + "";
            I_ReportUserID_input.Text = user_model.U_CName;
        }
Example #10
0
        public void btnSave_Click(object sender, EventArgs e)
        {
            string strErr="";
            if(this.txtU_LoginName.Text.Trim().Length==0)
            {
                strErr+="登陆名不能为空!\\n";
            }
            if(this.txtU_Password.Text.Trim().Length==0)
            {
                strErr+="密码md5加密字符不能为空!\\n";
            }
            if(this.txtU_CName.Text.Trim().Length==0)
            {
                strErr+="中文姓名不能为空!\\n";
            }
            if(this.txtU_EName.Text.Trim().Length==0)
            {
                strErr+="英文名不能为空!\\n";
            }
            if(!PageValidate.IsNumber(txtU_GroupID.Text))
            {
                strErr+="部门ID号与sys_Group表中GroupID关联格式错误!\\n";
            }
            if(this.txtU_Email.Text.Trim().Length==0)
            {
                strErr+="电子邮件不能为空!\\n";
            }
            if(!PageValidate.IsNumber(txtU_Type.Text))
            {
                strErr+="用户类型0:超级用户1:普通用格式错误!\\n";
            }
            if(!PageValidate.IsNumber(txtU_Status.Text))
            {
                strErr+="当前状态0:正常 1:禁止登陆格式错误!\\n";
            }
            if(this.txtU_Licence.Text.Trim().Length==0)
            {
                strErr+="用户序列号不能为空!\\n";
            }
            if(this.txtU_Mac.Text.Trim().Length==0)
            {
                strErr+="锁定机器硬件地址不能为空!\\n";
            }
            if(this.txtU_Remark.Text.Trim().Length==0)
            {
                strErr+="备注说明不能为空!\\n";
            }
            if(this.txtU_IDCard.Text.Trim().Length==0)
            {
                strErr+="身份证号码不能为空!\\n";
            }
            if(!PageValidate.IsNumber(txtU_Sex.Text))
            {
                strErr+="性别1:男0:女格式错误!\\n";
            }
            if(!PageValidate.IsDateTime(txtU_BirthDay.Text))
            {
                strErr+="出生日期格式错误!\\n";
            }
            if(this.txtU_MobileNo.Text.Trim().Length==0)
            {
                strErr+="手机号不能为空!\\n";
            }
            if(this.txtU_UserNO.Text.Trim().Length==0)
            {
                strErr+="员工编号不能为空!\\n";
            }
            if(!PageValidate.IsDateTime(txtU_WorkStartDate.Text))
            {
                strErr+="到职日期格式错误!\\n";
            }
            if(!PageValidate.IsDateTime(txtU_WorkEndDate.Text))
            {
                strErr+="离职日期格式错误!\\n";
            }
            if(this.txtU_CompanyMail.Text.Trim().Length==0)
            {
                strErr+="公司邮件地址不能为空!\\n";
            }
            if(!PageValidate.IsNumber(txtU_Title.Text))
            {
                strErr+="职称与应用字段关联格式错误!\\n";
            }
            if(this.txtU_Extension.Text.Trim().Length==0)
            {
                strErr+="分机号不能为空!\\n";
            }
            if(this.txtU_HomeTel.Text.Trim().Length==0)
            {
                strErr+="家中电话不能为空!\\n";
            }
            if(this.txtU_PhotoUrl.Text.Trim().Length==0)
            {
                strErr+="用户照片网址不能为空!\\n";
            }
            if(!PageValidate.IsDateTime(txtU_DateTime.Text))
            {
                strErr+="操作时间格式错误!\\n";
            }
            if(this.txtU_LastIP.Text.Trim().Length==0)
            {
                strErr+="最后访问IP不能为空!\\n";
            }
            if(!PageValidate.IsDateTime(txtU_LastDateTime.Text))
            {
                strErr+="最后访问时间格式错误!\\n";
            }
            if(this.txtU_ExtendField.Text.Trim().Length==0)
            {
                strErr+="扩展字段不能为空!\\n";
            }
            if(this.txtU_LoginType.Text.Trim().Length==0)
            {
                strErr+="登入类型(为空系统认证,其它值不能为空!\\n";
            }
            if(!PageValidate.IsNumber(txtU_HospitalGroupID.Text))
            {
                strErr+="医院部门ID号与sys_Group表中GroupID关联格式错误!\\n";
            }

            if(strErr!="")
            {
                MessageBox.Show(this,strErr);
                return;
            }
            int UserID=int.Parse(this.lblUserID.Text);
            string U_LoginName=this.txtU_LoginName.Text;
            string U_Password=this.txtU_Password.Text;
            string U_CName=this.txtU_CName.Text;
            string U_EName=this.txtU_EName.Text;
            int U_GroupID=int.Parse(this.txtU_GroupID.Text);
            string U_Email=this.txtU_Email.Text;
            int U_Type=int.Parse(this.txtU_Type.Text);
            int U_Status=int.Parse(this.txtU_Status.Text);
            string U_Licence=this.txtU_Licence.Text;
            string U_Mac=this.txtU_Mac.Text;
            string U_Remark=this.txtU_Remark.Text;
            string U_IDCard=this.txtU_IDCard.Text;
            int U_Sex=int.Parse(this.txtU_Sex.Text);
            DateTime U_BirthDay=DateTime.Parse(this.txtU_BirthDay.Text);
            string U_MobileNo=this.txtU_MobileNo.Text;
            string U_UserNO=this.txtU_UserNO.Text;
            DateTime U_WorkStartDate=DateTime.Parse(this.txtU_WorkStartDate.Text);
            DateTime U_WorkEndDate=DateTime.Parse(this.txtU_WorkEndDate.Text);
            string U_CompanyMail=this.txtU_CompanyMail.Text;
            int U_Title=int.Parse(this.txtU_Title.Text);
            string U_Extension=this.txtU_Extension.Text;
            string U_HomeTel=this.txtU_HomeTel.Text;
            string U_PhotoUrl=this.txtU_PhotoUrl.Text;
            DateTime U_DateTime=DateTime.Parse(this.txtU_DateTime.Text);
            string U_LastIP=this.txtU_LastIP.Text;
            DateTime U_LastDateTime=DateTime.Parse(this.txtU_LastDateTime.Text);
            string U_ExtendField=this.txtU_ExtendField.Text;
            string U_LoginType=this.txtU_LoginType.Text;
            int U_HospitalGroupID=int.Parse(this.txtU_HospitalGroupID.Text);

            Maticsoft.Model.sys_User model=new Maticsoft.Model.sys_User();
            model.UserID=UserID;
            model.U_LoginName=U_LoginName;
            model.U_Password=U_Password;
            model.U_CName=U_CName;
            model.U_EName=U_EName;
            model.U_GroupID=U_GroupID;
            model.U_Email=U_Email;
            model.U_Type=U_Type;
            model.U_Status=U_Status;
            model.U_Licence=U_Licence;
            model.U_Mac=U_Mac;
            model.U_Remark=U_Remark;
            model.U_IDCard=U_IDCard;
            model.U_Sex=U_Sex;
            model.U_BirthDay=U_BirthDay;
            model.U_MobileNo=U_MobileNo;
            model.U_UserNO=U_UserNO;
            model.U_WorkStartDate=U_WorkStartDate;
            model.U_WorkEndDate=U_WorkEndDate;
            model.U_CompanyMail=U_CompanyMail;
            model.U_Title=U_Title;
            model.U_Extension=U_Extension;
            model.U_HomeTel=U_HomeTel;
            model.U_PhotoUrl=U_PhotoUrl;
            model.U_DateTime=U_DateTime;
            model.U_LastIP=U_LastIP;
            model.U_LastDateTime=U_LastDateTime;
            model.U_ExtendField=U_ExtendField;
            model.U_LoginType=U_LoginType;
            model.U_HospitalGroupID=U_HospitalGroupID;

            Maticsoft.BLL.sys_User bll=new Maticsoft.BLL.sys_User();
            bll.Update(model);
            Maticsoft.Common.MessageBox.ShowAndRedirect(this,"保存成功!","list.aspx");
        }
Example #11
0
 /// <summary>
 /// 在编辑的时候将对应的值绑定到Label上
 /// </summary>
 private void InputData()
 {
     Maticsoft.BLL.record_FamilyBaseInfo bll = new Maticsoft.BLL.record_FamilyBaseInfo();
     Maticsoft.Model.record_FamilyBaseInfo model = bll.GetModel(FamilyID);
     F_FamilyTel.Text = model.F_FamilyTel.ToString();
     F_HouseType.SelectedValue = model.F_HouseType + "";
     F_FamilyAddress.Text = model.F_FamilyAddress;
     F_FamilyCode.Text = model.F_FamilyCode;
     F_HouseArea.Text = model.F_HouseArea.ToString();
     F_Ventilation.SelectedValue = model.F_Ventilation + "";
     F_Humidity.SelectedValue = model.F_Humidity + "";
     F_Warm.SelectedValue = model.F_Warm + "";
     F_Lighting.SelectedValue = model.F_Lighting + "";
     F_Sanitation.SelectedValue = model.F_Sanitation + "";
     F_Kitchen.SelectedValue = model.F_Kitchen + "";
     F_Fuel.SelectedValue = model.F_Fuel + "";
     F_Water.SelectedValue = model.F_Water + "";
     F_WasteDisposal.SelectedValue = model.F_WasteDisposal + "";
     F_LivestockBar.SelectedValue = model.F_LivestockBar + "";
     F_ToiletType.SelectedValue = model.F_ToiletType + "";
     Maticsoft.BLL.sys_User user_bll = new Maticsoft.BLL.sys_User();
     Maticsoft.Model.sys_User user_model = user_bll.GetModel(model.F_UserID);
     F_UserID.Value = user_model.UserID + "";
     F_UserID_input.Value = user_model.U_CName;
     Maticsoft.Model.sys_User user_model1 = user_bll.GetModel(model.F_ResponsibilityUserID);
     F_ResponsibilityUserID.Value = user_model1.UserID + "";
     F_ResponsibilityUserID_input.Value = user_model1.U_CName;
     Maticsoft.Model.sys_User user_model2 = user_bll.GetModel(model.F_FillingUserID);
     F_FillingUserID.Value = user_model2.UserID + "";
     F_FillingUserID_input.Value = user_model2.U_CName;
     Maticsoft.BLL.record_FamilyProblem record_FamilyProblem_bll = new Maticsoft.BLL.record_FamilyProblem();
     Maticsoft.Model.record_FamilyProblem record_FamilyProblem_model = record_FamilyProblem_bll.GetModel(model.FamilyID);
     if (record_FamilyProblem_model != null)
     {
         F_RecordTime.Text = record_FamilyProblem_model.F_RecordTime.ToShortDateString();
         F_StartTime.Text = record_FamilyProblem_model.F_StartTime.ToShortDateString();
         F_endTime.Text = record_FamilyProblem_model.F_endTime.ToShortDateString();
         F_OverviewProblem.Text = record_FamilyProblem_model.F_OverviewProblem.ToString();
         F_DetailProblem.Text = record_FamilyProblem_model.F_DetailProblem.ToString();
         Maticsoft.BLL.sys_User fillinguser_bll = new Maticsoft.BLL.sys_User();
         Maticsoft.Model.sys_User fillinguser_model = fillinguser_bll.GetModel(model.F_FillingUserID);
         F_FillingUserID2.Value = user_model.UserID + "";
         F_FillingUserID2_input.Value = user_model.U_CName;
     }
 }
Example #12
0
 /// <summary>
 /// 通过用户id得到用户信息
 /// </summary>
 /// <param name="userID"></param>
 /// <returns></returns>
 public Maticsoft.Model.sys_User getUserNameById(int userID)
 {
     Maticsoft.BLL.sys_User   bll   = new Maticsoft.BLL.sys_User();
     Maticsoft.Model.sys_User model = bll.GetModel(userID);
     return(model);
 }
Example #13
0
        public void btnSave_Click(object sender, EventArgs e)
        {
            string strErr = "";

            if (this.txtU_LoginName.Text.Trim().Length == 0)
            {
                strErr += "登陆名不能为空!\\n";
            }
            if (this.txtU_Password.Text.Trim().Length == 0)
            {
                strErr += "密码md5加密字符不能为空!\\n";
            }
            if (this.txtU_CName.Text.Trim().Length == 0)
            {
                strErr += "中文姓名不能为空!\\n";
            }
            if (this.txtU_EName.Text.Trim().Length == 0)
            {
                strErr += "英文名不能为空!\\n";
            }
            if (!PageValidate.IsNumber(txtU_GroupID.Text))
            {
                strErr += "部门ID号与sys_Group表中GroupID关联格式错误!\\n";
            }
            if (this.txtU_Email.Text.Trim().Length == 0)
            {
                strErr += "电子邮件不能为空!\\n";
            }
            if (!PageValidate.IsNumber(txtU_Type.Text))
            {
                strErr += "用户类型0:超级用户1:普通用格式错误!\\n";
            }
            if (!PageValidate.IsNumber(txtU_Status.Text))
            {
                strErr += "当前状态0:正常 1:禁止登陆格式错误!\\n";
            }
            if (this.txtU_Licence.Text.Trim().Length == 0)
            {
                strErr += "用户序列号不能为空!\\n";
            }
            if (this.txtU_Mac.Text.Trim().Length == 0)
            {
                strErr += "锁定机器硬件地址不能为空!\\n";
            }
            if (this.txtU_Remark.Text.Trim().Length == 0)
            {
                strErr += "备注说明不能为空!\\n";
            }
            if (this.txtU_IDCard.Text.Trim().Length == 0)
            {
                strErr += "身份证号码不能为空!\\n";
            }
            if (!PageValidate.IsNumber(txtU_Sex.Text))
            {
                strErr += "性别1:男0:女格式错误!\\n";
            }
            if (!PageValidate.IsDateTime(txtU_BirthDay.Text))
            {
                strErr += "出生日期格式错误!\\n";
            }
            if (this.txtU_MobileNo.Text.Trim().Length == 0)
            {
                strErr += "手机号不能为空!\\n";
            }
            if (this.txtU_UserNO.Text.Trim().Length == 0)
            {
                strErr += "员工编号不能为空!\\n";
            }
            if (!PageValidate.IsDateTime(txtU_WorkStartDate.Text))
            {
                strErr += "到职日期格式错误!\\n";
            }
            if (!PageValidate.IsDateTime(txtU_WorkEndDate.Text))
            {
                strErr += "离职日期格式错误!\\n";
            }
            if (this.txtU_CompanyMail.Text.Trim().Length == 0)
            {
                strErr += "公司邮件地址不能为空!\\n";
            }
            if (!PageValidate.IsNumber(txtU_Title.Text))
            {
                strErr += "职称与应用字段关联格式错误!\\n";
            }
            if (this.txtU_Extension.Text.Trim().Length == 0)
            {
                strErr += "分机号不能为空!\\n";
            }
            if (this.txtU_HomeTel.Text.Trim().Length == 0)
            {
                strErr += "家中电话不能为空!\\n";
            }
            if (this.txtU_PhotoUrl.Text.Trim().Length == 0)
            {
                strErr += "用户照片网址不能为空!\\n";
            }
            if (!PageValidate.IsDateTime(txtU_DateTime.Text))
            {
                strErr += "操作时间格式错误!\\n";
            }
            if (this.txtU_LastIP.Text.Trim().Length == 0)
            {
                strErr += "最后访问IP不能为空!\\n";
            }
            if (!PageValidate.IsDateTime(txtU_LastDateTime.Text))
            {
                strErr += "最后访问时间格式错误!\\n";
            }
            if (this.txtU_ExtendField.Text.Trim().Length == 0)
            {
                strErr += "扩展字段不能为空!\\n";
            }
            if (this.txtU_LoginType.Text.Trim().Length == 0)
            {
                strErr += "登入类型(为空系统认证,其它值不能为空!\\n";
            }
            if (!PageValidate.IsNumber(txtU_HospitalGroupID.Text))
            {
                strErr += "医院部门ID号与sys_Group表中GroupID关联格式错误!\\n";
            }

            if (strErr != "")
            {
                MessageBox.Show(this, strErr);
                return;
            }
            int      UserID            = int.Parse(this.lblUserID.Text);
            string   U_LoginName       = this.txtU_LoginName.Text;
            string   U_Password        = this.txtU_Password.Text;
            string   U_CName           = this.txtU_CName.Text;
            string   U_EName           = this.txtU_EName.Text;
            int      U_GroupID         = int.Parse(this.txtU_GroupID.Text);
            string   U_Email           = this.txtU_Email.Text;
            int      U_Type            = int.Parse(this.txtU_Type.Text);
            int      U_Status          = int.Parse(this.txtU_Status.Text);
            string   U_Licence         = this.txtU_Licence.Text;
            string   U_Mac             = this.txtU_Mac.Text;
            string   U_Remark          = this.txtU_Remark.Text;
            string   U_IDCard          = this.txtU_IDCard.Text;
            int      U_Sex             = int.Parse(this.txtU_Sex.Text);
            DateTime U_BirthDay        = DateTime.Parse(this.txtU_BirthDay.Text);
            string   U_MobileNo        = this.txtU_MobileNo.Text;
            string   U_UserNO          = this.txtU_UserNO.Text;
            DateTime U_WorkStartDate   = DateTime.Parse(this.txtU_WorkStartDate.Text);
            DateTime U_WorkEndDate     = DateTime.Parse(this.txtU_WorkEndDate.Text);
            string   U_CompanyMail     = this.txtU_CompanyMail.Text;
            int      U_Title           = int.Parse(this.txtU_Title.Text);
            string   U_Extension       = this.txtU_Extension.Text;
            string   U_HomeTel         = this.txtU_HomeTel.Text;
            string   U_PhotoUrl        = this.txtU_PhotoUrl.Text;
            DateTime U_DateTime        = DateTime.Parse(this.txtU_DateTime.Text);
            string   U_LastIP          = this.txtU_LastIP.Text;
            DateTime U_LastDateTime    = DateTime.Parse(this.txtU_LastDateTime.Text);
            string   U_ExtendField     = this.txtU_ExtendField.Text;
            string   U_LoginType       = this.txtU_LoginType.Text;
            int      U_HospitalGroupID = int.Parse(this.txtU_HospitalGroupID.Text);


            Maticsoft.Model.sys_User model = new Maticsoft.Model.sys_User();
            model.UserID            = UserID;
            model.U_LoginName       = U_LoginName;
            model.U_Password        = U_Password;
            model.U_CName           = U_CName;
            model.U_EName           = U_EName;
            model.U_GroupID         = U_GroupID;
            model.U_Email           = U_Email;
            model.U_Type            = U_Type;
            model.U_Status          = U_Status;
            model.U_Licence         = U_Licence;
            model.U_Mac             = U_Mac;
            model.U_Remark          = U_Remark;
            model.U_IDCard          = U_IDCard;
            model.U_Sex             = U_Sex;
            model.U_BirthDay        = U_BirthDay;
            model.U_MobileNo        = U_MobileNo;
            model.U_UserNO          = U_UserNO;
            model.U_WorkStartDate   = U_WorkStartDate;
            model.U_WorkEndDate     = U_WorkEndDate;
            model.U_CompanyMail     = U_CompanyMail;
            model.U_Title           = U_Title;
            model.U_Extension       = U_Extension;
            model.U_HomeTel         = U_HomeTel;
            model.U_PhotoUrl        = U_PhotoUrl;
            model.U_DateTime        = U_DateTime;
            model.U_LastIP          = U_LastIP;
            model.U_LastDateTime    = U_LastDateTime;
            model.U_ExtendField     = U_ExtendField;
            model.U_LoginType       = U_LoginType;
            model.U_HospitalGroupID = U_HospitalGroupID;

            Maticsoft.BLL.sys_User bll = new Maticsoft.BLL.sys_User();
            bll.Update(model);
            Maticsoft.Common.MessageBox.ShowAndRedirect(this, "保存成功!", "list.aspx");
        }
Example #14
0
 /// <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 + "";
     }
 }
Example #15
0
 /// <summary>
 /// 在编辑的时候将对应的值绑定到Label上
 /// </summary>
 private void InputData()
 {
     Maticsoft.BLL.supervision_Inspect bll = new Maticsoft.BLL.supervision_Inspect();
     Maticsoft.Model.supervision_Inspect model = bll.GetModel(InspectID);
     I_Date.Text = model.I_Date.ToShortDateString();
     I_Type.SelectedValue = model.I_Type+"";
     I_Content.Text = model.I_Content;
     Maticsoft.BLL.sys_User user_bll = new Maticsoft.BLL.sys_User();
     Maticsoft.Model.sys_User user_model = user_bll.GetModel(model.I_UserID);
     I_UserID.Value = user_model.UserID + "";
     I_UserID_input.Text = user_model.U_CName;
 }
Example #16
0
        /// <summary>
        /// 在编辑的时候将对应的值绑定
        /// </summary>
        private void InputData()
        {
            Maticsoft.BLL.sys_User sysUser_bll = new Maticsoft.BLL.sys_User();
            Maticsoft.Model.sys_User sysUser_model = sysUser_bll.GetModel(UserID);

            Maticsoft.BLL.record_UserBaseInfo record_UserBaseInfo_bll = new Maticsoft.BLL.record_UserBaseInfo();
            Maticsoft.Model.record_UserBaseInfo record_UserBaseInfo_model = record_UserBaseInfo_bll.GetModel(UserID);

            this.U_IDCard.Text = sysUser_model.U_IDCard;
            this.U_CName.Text = sysUser_model.U_CName;
            this.U_Hometown.Text = record_UserBaseInfo_model.U_Hometown;
            this.U_CurrentAddress.Text = record_UserBaseInfo_model.U_CurrentAddress;
            this.U_Sex.SelectedValue = sysUser_model.U_Sex + "";

            Maticsoft.BLL.Nation nation_bll = new Maticsoft.BLL.Nation();
            Maticsoft.Model.Nation nation_model = nation_bll.GetModel(record_UserBaseInfo_model.U_NationID);
            this.U_NationID.SelectedValue = nation_model.NationID + "";

            this.U_MarriageStatus.SelectedValue = record_UserBaseInfo_model.U_MarriageStatus + "";
            this.U_BloodType.SelectedValue = record_UserBaseInfo_model.U_BloodType + "";
            this.U_MobileNo.Text = sysUser_model.U_MobileNo;

            Maticsoft.BLL.sys_Group sysGroup_bll = new Maticsoft.BLL.sys_Group();
            Maticsoft.Model.sys_Group sysGroup_model = sysGroup_bll.GetModel(record_UserBaseInfo_model.U_Committee);
            this.U_Committee_input.Value = sysGroup_model.G_CName;
            this.U_Committee.Value = record_UserBaseInfo_model.U_Committee + "";

            this.U_PermanentType.SelectedValue = record_UserBaseInfo_model.U_PermanentType + "";
            this.U_Education.SelectedValue = record_UserBaseInfo_model.U_Education + "";
            this.U_WorkingUnits.Text = record_UserBaseInfo_model.U_WorkingUnits;
            this.U_WorkingContactName.Text = record_UserBaseInfo_model.U_WorkingContactName;
            this.U_WorkingContactTel.Text = record_UserBaseInfo_model.U_WorkingContactTel;

            this.U_PaymentType.Text = record_UserBaseInfo_model.U_PaymentType;
            this.U_SocialNO.Text = record_UserBaseInfo_model.U_SocialNO;
            this.U_MedicalNO.Text = record_UserBaseInfo_model.U_MedicalNO;
            this.U_FamilyCode.Value= record_UserBaseInfo_model.U_FamilyCode;
            this.U_FamilyCode_input.Value = record_UserBaseInfo_model.U_FamilyCode;
            this.U_RelationShip.SelectedValue = record_UserBaseInfo_model.U_RelationShip + "";
            this.U_AuditStatus.SelectedValue = record_UserBaseInfo_model.U_RelationShip + "";

            this.U_ResponsibilityUserID_input.Value = getUserModelById(record_UserBaseInfo_model.U_ResponsibilityUserID).U_CName;
            this.U_ResponsibilityUserID.Value = record_UserBaseInfo_model.U_ResponsibilityUserID + "";

            sysGroup_model = sysGroup_bll.GetModel(record_UserBaseInfo_model.U_FilingUnits);
            this.U_FilingUnits_input.Value = sysGroup_model.G_CName;
            this.U_FilingUnits.Value = record_UserBaseInfo_model.U_FilingUnits + "";

            this.U_FilingUserID_input.Value = getUserModelById(record_UserBaseInfo_model.U_FilingUserID).U_CName;
            this.U_FilingUserID.Value = record_UserBaseInfo_model.U_FilingUserID + "";

            //扩展信息
            //疾病史
            Maticsoft.BLL.extend_DiseaseHistory extend_DiseaseHistory_bll = new Maticsoft.BLL.extend_DiseaseHistory();
            List<Maticsoft.Model.extend_DiseaseHistory> extend_DiseaseHistory_models = extend_DiseaseHistory_bll.GetModelList("DH_UserID = " + UserID);
            DiseaseHistory_data.Value = "[";
            if (extend_DiseaseHistory_models.Count > 0)
            {
                for (int i = 0; i < extend_DiseaseHistory_models.Count; i++)
                {
                    DiseaseHistory_data.Value = DiseaseHistory_data.Value + "{'type':" + extend_DiseaseHistory_models[i].DH_Type + ",'date':" + TimeParser.UNIX_TIMESTAMP(extend_DiseaseHistory_models[i].DH_DiagnosisDate) + "},";  //以json的方式
                    if (extend_DiseaseHistory_models[i].DH_Type == 11)
                    {
                        DH_Type_11.Checked = true;
                        DH_Type_11_note.Value = extend_DiseaseHistory_models[i].DH_Note;
                        DH_DiagnosisDate_11.Value = extend_DiseaseHistory_models[i].DH_DiagnosisDate.ToShortDateString();
                    }
                }
                DiseaseHistory_data.Value = DiseaseHistory_data.Value.Remove(DiseaseHistory_data.Value.Length - 1);
            }
            else
            {
                DH_Type_0.Checked = true;
            }
            DiseaseHistory_data.Value = DiseaseHistory_data.Value + "]";

            //遗传病史
            Maticsoft.BLL.extend_GeneticDisease extend_GeneticDisease_bll = new Maticsoft.BLL.extend_GeneticDisease();
            Maticsoft.Model.extend_GeneticDisease extend_GeneticDisease_model = extend_GeneticDisease_bll.GetModel("GD_UserID=" + UserID);
            if (extend_GeneticDisease_model == null)
            {
                GeneticDisease_none.Checked = true;
            }
            else
            {
                GeneticDisease_check.Checked = true;
                GD_Name.Value = extend_GeneticDisease_model.GD_Name;
            }

            //残疾情况
            Maticsoft.BLL.extend_Disability extend_Disability_bll = new Maticsoft.BLL.extend_Disability();
            List<Maticsoft.Model.extend_Disability> extend_Disability_models = extend_Disability_bll.GetModelList("D_UserID=" + UserID);
            for (int i = 0; i < extend_Disability_models.Count; i++)
            {
                int D_Type = extend_Disability_models[i].D_Type;
                DisabilityList.Items[D_Type].Selected = true;
                if (D_Type == 7)
                    D_Note.Value = extend_Disability_models[i].D_Note;
            }

            //家族史
            Maticsoft.BLL.extend_FamilyHistory extend_FamilyHistory_bll = new Maticsoft.BLL.extend_FamilyHistory();
            //父亲
            List<Maticsoft.Model.extend_FamilyHistory> extend_FamilyHistory_father_models = extend_FamilyHistory_bll.GetModelList("FH_Who = " + 1);
            fatherDisease_data.Value = "[";
            if (extend_FamilyHistory_father_models.Count > 0)
            {
                for (int i = 0; i < extend_FamilyHistory_father_models.Count; i++)
                {
                    fatherDisease_data.Value = fatherDisease_data.Value + "{'type':" + extend_FamilyHistory_father_models[i].FH_Type + "},";  //以json的方式
                    if (extend_FamilyHistory_father_models[i].FH_Type == 11)
                    {
                        father_FH_Type11.Checked = true;
                        father_note.Value = extend_FamilyHistory_father_models[i].FH_Note;
                    }
                }
                fatherDisease_data.Value = fatherDisease_data.Value.Remove(fatherDisease_data.Value.Length - 1);
            }
            fatherDisease_data.Value = fatherDisease_data.Value + "]";

            //母亲
            List<Maticsoft.Model.extend_FamilyHistory> extend_FamilyHistory_mather_models = extend_FamilyHistory_bll.GetModelList("FH_Who = " + 2);
            matherDisease_data.Value = "[";
            if (extend_FamilyHistory_mather_models.Count > 0)
            {
                for (int i = 0; i < extend_FamilyHistory_mather_models.Count; i++)
                {
                    matherDisease_data.Value = matherDisease_data.Value + "{'type':" + extend_FamilyHistory_mather_models[i].FH_Type + "},";  //以json的方式
                    if (extend_FamilyHistory_mather_models[i].FH_Type == 11)
                    {
                        mather_FH_Type11.Checked = true;
                        mather_note.Value = extend_FamilyHistory_mather_models[i].FH_Note;
                    }
                }
                matherDisease_data.Value = matherDisease_data.Value.Remove(matherDisease_data.Value.Length - 1);
            }
            matherDisease_data.Value = matherDisease_data.Value + "]";

            //兄弟姐妹
            List<Maticsoft.Model.extend_FamilyHistory> extend_FamilyHistory_brothers_models = extend_FamilyHistory_bll.GetModelList("FH_Who = " + 3);
            brothersDisease_data.Value = "[";
            if (extend_FamilyHistory_brothers_models.Count > 0)
            {
                for (int i = 0; i < extend_FamilyHistory_brothers_models.Count; i++)
                {
                    brothersDisease_data.Value = brothersDisease_data.Value + "{'type':" + extend_FamilyHistory_brothers_models[i].FH_Type + "},";  //以json的方式
                    if (extend_FamilyHistory_brothers_models[i].FH_Type == 11)
                    {
                        brothers_FH_Type11.Checked = true;
                        brothers_note.Value = extend_FamilyHistory_brothers_models[i].FH_Note;
                    }
                }
                brothersDisease_data.Value = brothersDisease_data.Value.Remove(brothersDisease_data.Value.Length - 1);
            }
            brothersDisease_data.Value = brothersDisease_data.Value + "]";

            //子女
            List<Maticsoft.Model.extend_FamilyHistory> extend_FamilyHistory_children_models = extend_FamilyHistory_bll.GetModelList("FH_Who = " + 4);
            childrenDisease_data.Value = "[";
            if (extend_FamilyHistory_children_models.Count > 0)
            {
                for (int i = 0; i < extend_FamilyHistory_children_models.Count; i++)
                {
                    childrenDisease_data.Value = childrenDisease_data.Value + "{'type':" + extend_FamilyHistory_children_models[i].FH_Type + "},";  //以json的方式
                    if (extend_FamilyHistory_children_models[i].FH_Type == 11)
                    {
                        children_FH_Type11.Checked = true;
                        children_note.Value = extend_FamilyHistory_children_models[i].FH_Note;
                    }
                }
                childrenDisease_data.Value = childrenDisease_data.Value.Remove(childrenDisease_data.Value.Length - 1);
            }
            childrenDisease_data.Value = childrenDisease_data.Value + "]";

            //生活环境
            Maticsoft.BLL.extend_Environment extend_Environment_bll = new Maticsoft.BLL.extend_Environment();
            //厨房排风设施
            List<Maticsoft.Model.extend_Environment> extend_Environment_kind1_models = extend_Environment_bll.GetModelList(string.Format("E_UserID = {0} and E_Kind={1}", UserID, 1));
            for (int i = 0; i < extend_Environment_kind1_models.Count; i++)
            {
                E_Kind1.Items[extend_Environment_kind1_models[i].E_Type - 1].Selected = true;
            }
            //燃料类型
            List<Maticsoft.Model.extend_Environment> extend_Environment_kind2_models = extend_Environment_bll.GetModelList(string.Format("E_UserID = {0} and E_Kind={1}", UserID, 2));
            for (int i = 0; i < extend_Environment_kind2_models.Count; i++)
            {
                E_Kind2.Items[extend_Environment_kind2_models[i].E_Type - 1].Selected = true;
            }
            //饮水
            List<Maticsoft.Model.extend_Environment> extend_Environment_kind3_models = extend_Environment_bll.GetModelList(string.Format("E_UserID = {0} and E_Kind={1}", UserID, 3));
            for (int i = 0; i < extend_Environment_kind3_models.Count; i++)
            {
                E_Kind3.Items[extend_Environment_kind3_models[i].E_Type - 1].Selected = true;
            }
            //厕所
            List<Maticsoft.Model.extend_Environment> extend_Environment_kind4_models = extend_Environment_bll.GetModelList(string.Format("E_UserID = {0} and E_Kind={1}", UserID, 4));
            for (int i = 0; i < extend_Environment_kind4_models.Count; i++)
            {
                E_Kind4.Items[extend_Environment_kind4_models[i].E_Type - 1].Selected = true;
            }
            //禽畜栏
            List<Maticsoft.Model.extend_Environment> extend_Environment_kind5_models = extend_Environment_bll.GetModelList(string.Format("E_UserID = {0} and E_Kind={1}", UserID, 5));
            for (int i = 0; i < extend_Environment_kind5_models.Count; i++)
            {
                E_Kind5.Items[extend_Environment_kind5_models[i].E_Type - 1].Selected = true;
            }

            //备注
            U_Note.Value = record_UserBaseInfo_model.U_Note;
        }
Example #17
0
        /// <summary>
        /// 初始化
        /// </summary>
        private void OnStart()
        {
            bindDroplist();

            if (CMD == "New")
            {
            }
            else if (CMD == "Edit")
            {
                BindButton();
                InputData();
            }
            else if (CMD == "Delete")
            {
                Maticsoft.BLL.sys_User sysUser_bll = new Maticsoft.BLL.sys_User();
                Maticsoft.Model.sys_User sysUser_model = sysUser_bll.GetModel(UserID);
                sysUser_bll.Delete(UserID);

                Maticsoft.BLL.record_UserBaseInfo record_UserBaseInfo_bll = new Maticsoft.BLL.record_UserBaseInfo();
                Maticsoft.Model.record_UserBaseInfo record_UserBaseInfo_model = record_UserBaseInfo_bll.GetModel(UserID);
                record_UserBaseInfo_bll.Delete(UserID);

                Maticsoft.BLL.extend_DiseaseHistory extend_DiseaseHistory_bll = new Maticsoft.BLL.extend_DiseaseHistory();
                List<Maticsoft.Model.extend_DiseaseHistory> extend_DiseaseHistory_models = extend_DiseaseHistory_bll.GetModelList("DH_UserID = " + UserID);
                for (int i = 0; i < extend_DiseaseHistory_models.Count; i++)
                {
                    extend_DiseaseHistory_bll.Delete(extend_DiseaseHistory_models[i].DiseaseHistoryID);
                }

                Maticsoft.BLL.extend_GeneticDisease extend_GeneticDisease_bll = new Maticsoft.BLL.extend_GeneticDisease();
                Maticsoft.Model.extend_GeneticDisease extend_GeneticDisease_model = extend_GeneticDisease_bll.GetModel("GD_UserID=" + UserID);
                if (extend_GeneticDisease_model != null)
                {
                    extend_GeneticDisease_bll.Delete(extend_GeneticDisease_model.GeneticDiseaseID);
                }

                Maticsoft.BLL.extend_Disability extend_Disability_bll = new Maticsoft.BLL.extend_Disability();
                List<Maticsoft.Model.extend_Disability> extend_Disability_models = extend_Disability_bll.GetModelList("D_UserID=" + UserID);
                for (int i = 0; i < extend_DiseaseHistory_models.Count; i++)
                {
                    extend_Disability_bll.Delete(extend_Disability_models[i].DisabilityID);
                }

                Maticsoft.BLL.extend_FamilyHistory extend_FamilyHistory_bll = new Maticsoft.BLL.extend_FamilyHistory();

                List<Maticsoft.Model.extend_FamilyHistory> extend_FamilyHistory_father_models = extend_FamilyHistory_bll.GetModelList("FH_Who = " + 1);
                for (int i = 0; i < extend_FamilyHistory_father_models.Count; i++)
                {
                    extend_FamilyHistory_bll.Delete(extend_FamilyHistory_father_models[i].FamilyHistoryID);
                }

                List<Maticsoft.Model.extend_FamilyHistory> extend_FamilyHistory_mather_models = extend_FamilyHistory_bll.GetModelList("FH_Who = " + 2);
                for (int i = 0; i < extend_FamilyHistory_mather_models.Count; i++)
                {
                    extend_FamilyHistory_bll.Delete(extend_FamilyHistory_mather_models[i].FamilyHistoryID);
                }

                List<Maticsoft.Model.extend_FamilyHistory> extend_FamilyHistory_bothers_models = extend_FamilyHistory_bll.GetModelList("FH_Who = " + 3);
                for (int i = 0; i < extend_FamilyHistory_bothers_models.Count; i++)
                {
                    extend_FamilyHistory_bll.Delete(extend_FamilyHistory_bothers_models[i].FamilyHistoryID);
                }

                List<Maticsoft.Model.extend_FamilyHistory> extend_FamilyHistory_children_models = extend_FamilyHistory_bll.GetModelList("FH_Who = " + 4);
                for (int i = 0; i < extend_FamilyHistory_children_models.Count; i++)
                {
                    extend_FamilyHistory_bll.Delete(extend_FamilyHistory_children_models[i].FamilyHistoryID);
                }

                //生活环境
                Maticsoft.BLL.extend_Environment extend_Environment_bll = new Maticsoft.BLL.extend_Environment();
                //厨房排风设施
                List<Maticsoft.Model.extend_Environment> extend_Environment_kind1_models = extend_Environment_bll.GetModelList(string.Format("E_UserID = {0} and E_Kind={1}", UserID, 1));
                for (int i = 0; i < extend_Environment_kind1_models.Count; i++)
                {
                    extend_Environment_bll.Delete(extend_Environment_kind1_models[i].EnvironmentID);
                }
                //燃料类型
                List<Maticsoft.Model.extend_Environment> extend_Environment_kind2_models = extend_Environment_bll.GetModelList(string.Format("E_UserID = {0} and E_Kind={1}", UserID, 2));
                for (int i = 0; i < extend_Environment_kind2_models.Count; i++)
                {
                    extend_Environment_bll.Delete(extend_Environment_kind2_models[i].EnvironmentID);
                }
                //饮水
                List<Maticsoft.Model.extend_Environment> extend_Environment_kind3_models = extend_Environment_bll.GetModelList(string.Format("E_UserID = {0} and E_Kind={1}", UserID, 3));
                for (int i = 0; i < extend_Environment_kind3_models.Count; i++)
                {
                    extend_Environment_bll.Delete(extend_Environment_kind3_models[i].EnvironmentID);
                }
                //厕所
                List<Maticsoft.Model.extend_Environment> extend_Environment_kind4_models = extend_Environment_bll.GetModelList(string.Format("E_UserID = {0} and E_Kind={1}", UserID, 4));
                for (int i = 0; i < extend_Environment_kind4_models.Count; i++)
                {
                    extend_Environment_bll.Delete(extend_Environment_kind4_models[i].EnvironmentID);
                }
                //禽畜栏
                List<Maticsoft.Model.extend_Environment> extend_Environment_kind5_models = extend_Environment_bll.GetModelList(string.Format("E_UserID = {0} and E_Kind={1}", UserID, 5));
                for (int i = 0; i < extend_Environment_kind5_models.Count; i++)
                {
                    extend_Environment_bll.Delete(extend_Environment_kind5_models[i].EnvironmentID);
                }

                EventMessage.MessageBox(1, "操作成功", string.Format("{1}ID({0})成功!", UserID, "删除信息"), Icon_Type.OK, Common.GetHomeBaseUrl("default.aspx"));
            }
        }
Example #18
0
        /// <summary>
        /// 点击确定按钮执行的方法
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void Button1_Click(object sender, EventArgs e)
        {
            Maticsoft.BLL.sys_User sysUser_bll = new Maticsoft.BLL.sys_User();
            Maticsoft.Model.sys_User sysUser_model = sysUser_bll.GetModel(UserID);

            Maticsoft.BLL.record_UserBaseInfo record_UserBaseInfo_bll = new Maticsoft.BLL.record_UserBaseInfo();
            Maticsoft.Model.record_UserBaseInfo record_UserBaseInfo_model = record_UserBaseInfo_bll.GetModel(UserID);
            if (sysUser_model == null)
            {
                sysUser_model = new Maticsoft.Model.sys_User();
            }
            if (record_UserBaseInfo_model == null)
            {
                record_UserBaseInfo_model = new Maticsoft.Model.record_UserBaseInfo();
            }

            sysUser_model.U_IDCard = (string)Common.sink(this.U_IDCard.UniqueID, MethodType.Post, 0, 0, DataType.Str);
            sysUser_model.U_CName = (string)Common.sink(this.U_CName.UniqueID, MethodType.Post, 0, 0, DataType.Str);
            record_UserBaseInfo_model.U_Hometown = (string)Common.sink(this.U_Hometown.UniqueID, MethodType.Post, 0, 0, DataType.Str);
            record_UserBaseInfo_model.U_CurrentAddress = (string)Common.sink(this.U_CurrentAddress.UniqueID, MethodType.Post, 0, 0, DataType.Str);
            sysUser_model.U_Sex = Convert.ToInt32(this.U_Sex.SelectedValue);
            record_UserBaseInfo_model.U_NationID = Convert.ToInt32(this.U_NationID.SelectedValue);
            record_UserBaseInfo_model.U_MarriageStatus = Convert.ToInt32(this.U_MarriageStatus.SelectedValue);
            record_UserBaseInfo_model.U_BloodType = Convert.ToInt32(this.U_BloodType.SelectedValue);
            sysUser_model.U_MobileNo = (string)Common.sink(this.U_MobileNo.UniqueID, MethodType.Post, 0, 0, DataType.Str);
            record_UserBaseInfo_model.U_Committee = Convert.ToInt32(Common.sink(this.U_Committee.UniqueID, MethodType.Post, 0, 0, DataType.Str));
            record_UserBaseInfo_model.U_PermanentType = Convert.ToInt32(this.U_PermanentType.SelectedValue);
            record_UserBaseInfo_model.U_Education = Convert.ToInt32(this.U_Education.SelectedValue);
            record_UserBaseInfo_model.U_WorkingUnits = (string)Common.sink(this.U_WorkingUnits.UniqueID, MethodType.Post, 0, 0, DataType.Str);
            record_UserBaseInfo_model.U_WorkingContactName = (string)Common.sink(this.U_WorkingContactName.UniqueID, MethodType.Post, 0, 0, DataType.Str);
            record_UserBaseInfo_model.U_WorkingContactTel = (string)Common.sink(this.U_WorkingContactTel.UniqueID, MethodType.Post, 0, 0, DataType.Str);
            record_UserBaseInfo_model.U_PaymentType = this.U_PaymentType.SelectedValue;  //这里要改为多选
            record_UserBaseInfo_model.U_SocialNO = (string)Common.sink(this.U_SocialNO.UniqueID, MethodType.Post, 0, 0, DataType.Str);
            record_UserBaseInfo_model.U_MedicalNO = (string)Common.sink(this.U_MedicalNO.UniqueID, MethodType.Post, 0, 0, DataType.Str);
            record_UserBaseInfo_model.U_FamilyCode = (string)Common.sink(this.U_FamilyCode.UniqueID, MethodType.Post, 0, 0, DataType.Str);
            record_UserBaseInfo_model.U_RelationShip = Convert.ToInt32(this.U_RelationShip.SelectedValue);
            record_UserBaseInfo_model.U_ResponsibilityUserID = Convert.ToInt32(Common.sink(this.U_ResponsibilityUserID.UniqueID, MethodType.Post, 0, 0, DataType.Str));
            record_UserBaseInfo_model.U_AuditStatus = Convert.ToInt32(this.U_AuditStatus.SelectedValue);
            record_UserBaseInfo_model.U_FilingUnits = Convert.ToInt32(Common.sink(this.U_FilingUnits.UniqueID, MethodType.Post, 0, 0, DataType.Str));
            record_UserBaseInfo_model.U_FilingUserID = Convert.ToInt32(Common.sink(this.U_FilingUserID.UniqueID, MethodType.Post, 0, 0, DataType.Str));

            switch (CMD)
            {
                case "New":
                    CMD_Txt = "增加";
                    //如果是增加操作,就调用Add方法
                    if (!sysUser_bll.isExist(sysUser_model))
                    {
                        sysUser_model.U_Password = Common.md5(sysUser_model.U_IDCard, 32);  //初始密码为身份证号
                        string year = sysUser_model.U_IDCard.Substring(6, 4);
                        string month = sysUser_model.U_IDCard.Substring(10, 2);
                        string date = sysUser_model.U_IDCard.Substring(12, 2);
                        string result = year + "-" + month + "-" + date;
                        sysUser_model.U_LoginName = sysUser_model.U_IDCard;
                        sysUser_model.U_BirthDay = Convert.ToDateTime(result);
                        sysUser_model.U_DateTime = sysUser_model.U_LastDateTime = sysUser_model.U_WorkStartDate = sysUser_model.U_WorkEndDate = DateTime.Now;
                        sysUser_model.U_LastIP = Common.GetIPAddress();
                        sysUser_model.U_Type = 1;
                        sysUser_model.U_Status = 0;
                        record_UserBaseInfo_model.UserID = sysUser_bll.Add(sysUser_model);
                        record_UserBaseInfo_model.U_FlingTime = DateTime.Now;
                        record_UserBaseInfo_bll.Add(record_UserBaseInfo_model);
                        Maticsoft.BLL.sys_UserRoles sys_UserRoles_bll = new Maticsoft.BLL.sys_UserRoles();
                        Maticsoft.Model.sys_UserRoles sys_UserRoles_model = new Maticsoft.Model.sys_UserRoles();
                        sys_UserRoles_model.R_UserID = record_UserBaseInfo_model.UserID;
                        sys_UserRoles_model.R_RoleID = 1; //初始为普通用户
                    }
                    else
                    {
                        EventMessage.MessageBox(1, "操作失败", string.Format("个人健康档案号{0}已存在!", sysUser_model.U_IDCard), Icon_Type.Alert, Common.GetHomeBaseUrl("InfoManager.aspx?CMD=New"));
                    }
                    break;
                case "Edit":
                    CMD_Txt = "修改";
                    sysUser_bll.Update(sysUser_model);
                    record_UserBaseInfo_bll.Update(record_UserBaseInfo_model);
                    break;
            }
            All_Title_Txt = CMD_Txt + App_Txt;
                EventMessage.MessageBox(1, "操作成功", string.Format("{1}ID({0})成功!", UserID, All_Title_Txt), Icon_Type.OK, Common.GetHomeBaseUrl("default.aspx"));
        }
Example #19
0
        /// <summary>
        /// 在编辑的时候将对应的值绑定到Label上
        /// </summary>
        private void InputData()
        {
            Maticsoft.BLL.education_Prescription bll = new Maticsoft.BLL.education_Prescription();
            Maticsoft.Model.education_Prescription model = bll.GetModel(PrescriptionID);

            P_Date.Text = model.P_Date.ToShortDateString();
            P_Content.Text = model.P_Content;
            P_Name.Text = model.P_Name;

            Maticsoft.BLL.sys_User user_bll = new Maticsoft.BLL.sys_User();
            Maticsoft.Model.sys_User user_model1 = user_bll.GetModel(model.P_Object);
            P_Object.Value = user_model1.UserID + "";
            P_Object_input.Text = user_model1.U_CName;

            Maticsoft.Model.sys_User user_model2 = user_bll.GetModel(model.P_Doctor);
            P_Doctor.Value = user_model2.UserID + "";
            P_Doctor_input.Text = user_model2.U_CName;
        }
Example #20
0
        /// <summary>
        /// 在编辑的时候将对应的值绑定到Label上
        /// </summary>
        private void InputData()
        {
            //这两句和73、75作用一样
            Maticsoft.BLL.supervision_Info bll = new Maticsoft.BLL.supervision_Info();
            Maticsoft.Model.supervision_Info model = bll.GetModel(InfoID);

            //以下几行需要更改
            this.I_FindDate.Text = this.I_FindDate_Txt.Text = model.I_FindDate.ToShortDateString();
            this.I_Type.SelectedValue = model.I_Type+"";
            this.I_Type_Txt.Text = getSuperisionNameByType(model.I_Type);
            this.I_Content.Text = this.I_Content_Txt.Text = model.I_Content;
            this.I_ReportDate.Text = this.I_ReportDate.Text = model.I_ReportDate.ToShortDateString();
            Maticsoft.BLL.sys_User user_bll = new Maticsoft.BLL.sys_User();
            Maticsoft.Model.sys_User user_model = user_bll.GetModel(model.I_ReportUserID);
            this.I_ReportUserID.Value = user_model.UserID + "";
            this.I_ReportUserID_TextBox.Text = user_model.U_CName;
        }
Example #21
0
 /// <summary>
 /// 通过用户id得到用户信息
 /// </summary>
 /// <param name="userID"></param>
 /// <returns></returns>
 public Maticsoft.Model.sys_User getUserModelById(int userID)
 {
     Maticsoft.BLL.sys_User bll = new Maticsoft.BLL.sys_User();
     Maticsoft.Model.sys_User model = bll.GetModel(userID);
     return model;
 }
Example #22
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.sys_User bll = new Maticsoft.BLL.sys_User();
     DataSet datas = bll.GetListByPage(SearchTerms, orderby, startIndex, endIndex);
     GridView1.DataSource = datas;
     GridView1.DataBind();
     this.AspNetPager1.RecordCount = bll.GetRecordCount(SearchTerms);
 }