Ejemplo n.º 1
0
 private void ShowInfo(int NationID)
 {
     Maticsoft.BLL.Nation   bll   = new Maticsoft.BLL.Nation();
     Maticsoft.Model.Nation model = bll.GetModel(NationID);
     this.lblNationID.Text = model.NationID.ToString();
     this.lblN_Name.Text   = model.N_Name;
 }
Ejemplo n.º 2
0
 private void ShowInfo(int NationID)
 {
     Maticsoft.BLL.Nation bll=new Maticsoft.BLL.Nation();
     Maticsoft.Model.Nation model=bll.GetModel(NationID);
     this.lblNationID.Text=model.NationID.ToString();
     this.lblN_Name.Text=model.N_Name;
 }
Ejemplo n.º 3
0
        public void btnSave_Click(object sender, EventArgs e)
        {
            string strErr = "";

            if (this.txtN_Name.Text.Trim().Length == 0)
            {
                strErr += "民族名不能为空!\\n";
            }

            if (strErr != "")
            {
                MessageBox.Show(this, strErr);
                return;
            }
            int    NationID = int.Parse(this.lblNationID.Text);
            string N_Name   = this.txtN_Name.Text;


            Maticsoft.Model.Nation model = new Maticsoft.Model.Nation();
            model.NationID = NationID;
            model.N_Name   = N_Name;

            Maticsoft.BLL.Nation bll = new Maticsoft.BLL.Nation();
            bll.Update(model);
            Maticsoft.Common.MessageBox.ShowAndRedirect(this, "保存成功!", "list.aspx");
        }
Ejemplo n.º 4
0
        /// <summary>
        /// 绑定下拉列表
        /// </summary>
        public void bindDroplist()
        {
            Maticsoft.BLL.Nation nation_bll = new Maticsoft.BLL.Nation();
            this.U_NationID.DataSource = nation_bll.GetAllList();
            this.U_NationID.DataValueField = "NationID";
            this.U_NationID.DataTextField = "N_Name";
            this.U_NationID.DataBind();

            Maticsoft.BLL.commonDiseases commonDiseases_bll = new Maticsoft.BLL.commonDiseases();
            commonDiseases_list = commonDiseases_bll.GetModelList("CommonDiseaseID < 11");
            DiseaseHistory_repeater.DataSource = commonDiseases_list;
            DiseaseHistory_repeater.DataBind();

            fatherDisease_repeater.DataSource = commonDiseases_list;
            fatherDisease_repeater.DataBind();

            matherDisease_repeater.DataSource = commonDiseases_list;
            matherDisease_repeater.DataBind();

            brothersDisease_repeater.DataSource = commonDiseases_list;
            brothersDisease_repeater.DataBind();

            childrenDisease_repeater.DataSource = commonDiseases_list;
            childrenDisease_repeater.DataBind();
        }
Ejemplo n.º 5
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!Page.IsPostBack)
     {
         Maticsoft.BLL.Nation bll = new Maticsoft.BLL.Nation();
         if (Request.Params["id"] != null && Request.Params["id"].Trim() != "")
         {
             int NationID = (Convert.ToInt32(Request.Params["id"]));
             bll.Delete(NationID);
             Response.Redirect("list.aspx");
         }
     }
 }
Ejemplo n.º 6
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!Page.IsPostBack)
     {
         Maticsoft.BLL.Nation bll=new Maticsoft.BLL.Nation();
         if (Request.Params["id"] != null && Request.Params["id"].Trim() != "")
         {
             int NationID=(Convert.ToInt32(Request.Params["id"]));
             bll.Delete(NationID);
             Response.Redirect("list.aspx");
         }
     }
 }
Ejemplo n.º 7
0
        protected void btnSave_Click(object sender, EventArgs e)
        {
            string strErr="";
            if(this.txtN_Name.Text.Trim().Length==0)
            {
                strErr+="民族名不能为空!\\n";
            }

            if(strErr!="")
            {
                MessageBox.Show(this,strErr);
                return;
            }
            string N_Name=this.txtN_Name.Text;

            Maticsoft.Model.Nation model=new Maticsoft.Model.Nation();
            model.N_Name=N_Name;

            Maticsoft.BLL.Nation bll=new Maticsoft.BLL.Nation();
            bll.Add(model);
            Maticsoft.Common.MessageBox.ShowAndRedirect(this,"保存成功!","add.aspx");
        }
Ejemplo n.º 8
0
        protected void btnSave_Click(object sender, EventArgs e)
        {
            string strErr = "";

            if (this.txtN_Name.Text.Trim().Length == 0)
            {
                strErr += "民族名不能为空!\\n";
            }

            if (strErr != "")
            {
                MessageBox.Show(this, strErr);
                return;
            }
            string N_Name = this.txtN_Name.Text;

            Maticsoft.Model.Nation model = new Maticsoft.Model.Nation();
            model.N_Name = N_Name;

            Maticsoft.BLL.Nation bll = new Maticsoft.BLL.Nation();
            bll.Add(model);
            Maticsoft.Common.MessageBox.ShowAndRedirect(this, "保存成功!", "add.aspx");
        }
Ejemplo n.º 9
0
        public void btnSave_Click(object sender, EventArgs e)
        {
            string strErr="";
            if(this.txtN_Name.Text.Trim().Length==0)
            {
                strErr+="民族名不能为空!\\n";
            }

            if(strErr!="")
            {
                MessageBox.Show(this,strErr);
                return;
            }
            int NationID=int.Parse(this.lblNationID.Text);
            string N_Name=this.txtN_Name.Text;

            Maticsoft.Model.Nation model=new Maticsoft.Model.Nation();
            model.NationID=NationID;
            model.N_Name=N_Name;

            Maticsoft.BLL.Nation bll=new Maticsoft.BLL.Nation();
            bll.Update(model);
            Maticsoft.Common.MessageBox.ShowAndRedirect(this,"保存成功!","list.aspx");
        }
Ejemplo n.º 10
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;
        }