Example #1
0
        /// <summary>
        /// �������
        /// </summary>
        private void BindData()
        {
            string GroupIDs = "", strWhere = "";
            decimal man_p, woman_p;
            int man, woman;
            Maticsoft.BLL.sys_Group sys_Group_bll = new Maticsoft.BLL.sys_Group();
            int groupID = UserData.GetUserDate.U_GroupID;
            if (UserData.GetUserDate.U_Type == 0)
                title = "ȫ�������Ա�ͳ��";
            else
            {
                title = sys_Group_bll.GetModel(groupID).G_CName + "�����Ա�ͳ��";
                GroupIDs = sys_Group_bll.GetLowerLevelString_withSelf(groupID, false);
            }

            Maticsoft.BLL.sys_UserInfo sys_UserInfo_bll = new Maticsoft.BLL.sys_UserInfo();
            if (GroupIDs != "")
            {
                strWhere = "U_Sex={0} and U_Committee in ({1})";
                man = sys_UserInfo_bll.GetRecordCount(string.Format(strWhere, 1, GroupIDs));
                woman = sys_UserInfo_bll.GetRecordCount(string.Format(strWhere, 0, GroupIDs));
            }
            else
            {
                strWhere = "U_Sex={0}";
                man = sys_UserInfo_bll.GetRecordCount(string.Format(strWhere, 1));
                woman = sys_UserInfo_bll.GetRecordCount(string.Format(strWhere, 0));
            }
            man_p = Math.Round((decimal)man / (man + woman),3);
            woman_p = 1 - man_p;
            data = string.Format("['����', {0}],['��', {1}]",man_p, woman_p);
            table_data = string.Format("<tr class='body'><td>����</td><td>{0}</td><td>{1}%</td></tr><tr class='body'><td>��</td><td>{2}</td><td>{3}%</td></tr>", man, (float)man_p * 100, woman, (float)woman_p * 100);
        }
Example #2
0
        /// <summary>
        /// �������
        /// </summary>
        private void BindData()
        {
            string GroupIDs = "", strWhere = "";
            decimal han_p, other_p;
            int han, other;
            Maticsoft.BLL.sys_Group sys_Group_bll = new Maticsoft.BLL.sys_Group();
            int groupID = UserData.GetUserDate.U_GroupID;
            if (UserData.GetUserDate.U_Type == 0)
                title = "ȫ��������������ͳ��";
            else
            {
                title = sys_Group_bll.GetModel(groupID).G_CName + "������������ͳ��";
                GroupIDs = sys_Group_bll.GetLowerLevelString_withSelf(groupID, false);
            }

            Maticsoft.BLL.sys_UserInfo sys_UserInfo_bll = new Maticsoft.BLL.sys_UserInfo();
            if (GroupIDs != "")
            {
                strWhere = "U_NationID={0} and U_Committee in ({1})";
                han = sys_UserInfo_bll.GetRecordCount(string.Format(strWhere, 1, GroupIDs));
                other = sys_UserInfo_bll.GetRecordCount(string.Format("U_NationID<>{0} and U_Committee in ({1})", 1,GroupIDs));
            }
            else
            {
                strWhere = "U_NationID={0}";
                han = sys_UserInfo_bll.GetRecordCount(string.Format(strWhere, 1));
                other = sys_UserInfo_bll.GetRecordCount(string.Format("U_NationID<>{0}", 1));
            }
            han_p = Math.Round((decimal)han/(han + other), 3);
            other_p = 1 - han_p;
            data = string.Format("['����', {0}],['����', {1}]", han_p, other_p);
            table_data = string.Format("<tr class='body'><td>����</td><td>{0}</td><td>{1}%</td></tr><tr class='body'><td>����</td><td>{2}</td><td>{3}%</td></tr>", han, (float)han_p * 100, other, (float)other_p * 100);
        }
Example #3
0
        /// <summary>
        /// �������
        /// </summary>
        private void BindData()
        {
            string GroupIDs = "", strWhere = "";
            int sum = 0, temp = 0;
            int[] datas;
            Maticsoft.BLL.sys_Group sys_Group_bll = new Maticsoft.BLL.sys_Group();
            int groupID = UserData.GetUserDate.U_GroupID;
            if (UserData.GetUserDate.U_Type == 0)
                title = "ȫ����������ͳ��";
            else
            {
                title = sys_Group_bll.GetModel(groupID).G_CName + "��������ͳ��";
                GroupIDs = sys_Group_bll.GetLowerLevelString_withSelf(groupID, false);
            }

            Maticsoft.BLL.sys_UserInfo sys_UserInfo_bll = new Maticsoft.BLL.sys_UserInfo();
            List<Maticsoft.Model.sys_Group> list = new List<Maticsoft.Model.sys_Group>();
            Maticsoft.Model.sys_Group sys_Group_model = new Maticsoft.Model.sys_Group();

            if (GroupIDs != "")
            {
                list = sys_Group_bll.GetModelList(string.Format("G_Level={0} and GroupID in ({1}) ", 5, GroupIDs));
                datas = new int[list.Count];
                strWhere = "U_Committee={0}";
                for (int i = 0; i < list.Count; i++)
                {
                    sys_Group_model = (Maticsoft.Model.sys_Group)list[i];
                    datas[i] = temp = sys_UserInfo_bll.GetRecordCount(string.Format(strWhere, sys_Group_model.GroupID));
                    sum += temp;
                }
            }
            else
            {
                list = sys_Group_bll.GetModelList(string.Format("G_Level={0} ", 5));
                datas = new int[list.Count];
                strWhere = "U_Committee={0}";
                for (int i = 0; i < list.Count; i++)
                {
                    sys_Group_model = (Maticsoft.Model.sys_Group)list[i];
                    datas[i] = temp = sys_UserInfo_bll.GetRecordCount(string.Format(strWhere, sys_Group_model.GroupID));
                    sum += temp;
                }
            }

            for (int i = 0; i < list.Count; i++)
            {
                if (i != 0)
                {
                    data = data + ",";
                    categories = categories + ",";
                }
                float per = (float)Math.Round((decimal)datas[i] / sum * 100, 1);
                data = data + string.Format("{0}", datas[i]);
                sys_Group_model = (Maticsoft.Model.sys_Group)list[i];
                categories = categories + string.Format("'{0}'", sys_Group_model.G_CName);
                table_data = table_data + string.Format("<tr class='body'><td>{0}</td><td>{1}</td><td>{2}%</td></tr>", sys_Group_model.G_CName, datas[i], per);
            }
        }
Example #4
0
        /// <summary>
        /// �������
        /// </summary>
        private void BindData()
        {
            string GroupIDs = "", strWhere = "";
            int sum = 0, temp = 0;
            int[] datas;
            Maticsoft.BLL.sys_Group sys_Group_bll = new Maticsoft.BLL.sys_Group();
            int groupID = UserData.GetUserDate.U_GroupID;
            if (UserData.GetUserDate.U_Type == 0)
                title = "ȫ��������������ͳ��";
            else
            {
                title = sys_Group_bll.GetModel(groupID).G_CName + "������������ͳ��";
                GroupIDs = sys_Group_bll.GetLowerLevelString_withSelf(groupID, false);
            }

            Maticsoft.BLL.commonDiseases commonDiseases_bll = new Maticsoft.BLL.commonDiseases();
            List<Maticsoft.Model.commonDiseases> list = commonDiseases_bll.GetModelList("");
            Maticsoft.Model.commonDiseases commonDiseases_model = new Maticsoft.Model.commonDiseases();
            datas = new int[list.Count];

            Maticsoft.BLL.extend_UserDisease extend_UserDisease_bll = new Maticsoft.BLL.extend_UserDisease();
            if (GroupIDs != "")
            {
                strWhere = "DH_Type={0} and U_Committee in ({1})";
                for (int i = 0; i < list.Count; i++)
                {
                    commonDiseases_model = (Maticsoft.Model.commonDiseases)list[i];
                    datas[i] = temp = extend_UserDisease_bll.GetRecordCount(string.Format(strWhere, commonDiseases_model.CommonDiseaseID, GroupIDs));
                    sum += temp;
                }
            }
            else
            {
                strWhere = "DH_Type={0}";
                for (int i = 0; i < list.Count; i++)
                {
                    commonDiseases_model = (Maticsoft.Model.commonDiseases)list[i];
                    datas[i] = temp = extend_UserDisease_bll.GetRecordCount(string.Format(strWhere, commonDiseases_model.CommonDiseaseID));
                    sum += temp;
                }
            }

            for (int i = 0; i < list.Count; i++)
            {
                if (i != 0)
                {
                    data = data + ",";
                    categories = categories + ",";
                }
                float per = (float)Math.Round((decimal)datas[i] / sum * 100, 1);
                data = data + "{" + string.Format("y: {0}, color: colors[{1}]", datas[i], i) + "}";
                commonDiseases_model = (Maticsoft.Model.commonDiseases)list[i];
                categories = categories + string.Format("'{0}'", commonDiseases_model.CD_Name);
                table_data = table_data + string.Format("<tr class='body'><td>{0}</td><td>{1}</td><td>{2}%</td></tr>", commonDiseases_model.CD_Name, datas[i], per);
            }
        }
Example #5
0
        /// <summary>
        /// 点击确定按钮执行的方法
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void Button1_Click(object sender, EventArgs e)
        {
            Maticsoft.BLL.record_FamilyBaseInfo record_FamilyBaseInfo_bll = new Maticsoft.BLL.record_FamilyBaseInfo();
            Maticsoft.Model.record_FamilyBaseInfo record_FamilyBaseInfo_model = record_FamilyBaseInfo_bll.GetModel(FamilyID);

            if (record_FamilyBaseInfo_model == null)
            {
                record_FamilyBaseInfo_model = new Maticsoft.Model.record_FamilyBaseInfo();
            }

            //获取客户端通过Post方式传递过来的值的(需要更改)
            record_FamilyBaseInfo_model.F_FamilyTel = (string)Common.sink(this.F_FamilyTel.UniqueID, MethodType.Post, 255, 0, DataType.Str);
            record_FamilyBaseInfo_model.F_FamilyAddress = (string)Common.sink(this.F_FamilyAddress.UniqueID, MethodType.Post, 255, 0, DataType.Str);
            record_FamilyBaseInfo_model.F_HouseArea = Convert.ToInt32(Common.sink(this.F_HouseArea.UniqueID, MethodType.Post, 255, 0, DataType.Int));
            record_FamilyBaseInfo_model.F_HouseType = Convert.ToInt32(this.F_HouseType.SelectedValue);
            record_FamilyBaseInfo_model.F_Ventilation = Convert.ToInt32(this.F_Ventilation.SelectedValue);
            record_FamilyBaseInfo_model.F_Humidity = Convert.ToInt32(this.F_Humidity.SelectedValue);
            record_FamilyBaseInfo_model.F_Warm = Convert.ToInt32(this.F_Warm.SelectedValue);
            record_FamilyBaseInfo_model.F_Lighting = Convert.ToInt32(this.F_Lighting.SelectedValue);
            record_FamilyBaseInfo_model.F_Sanitation = Convert.ToInt32(this.F_Sanitation.SelectedValue);
            record_FamilyBaseInfo_model.F_Kitchen = Convert.ToInt32(this.F_Kitchen.SelectedValue);
            record_FamilyBaseInfo_model.F_Fuel = Convert.ToInt32(this.F_Fuel.SelectedValue);
            record_FamilyBaseInfo_model.F_Water = Convert.ToInt32(this.F_Water.SelectedValue);
            record_FamilyBaseInfo_model.F_WasteDisposal = Convert.ToInt32(this.F_WasteDisposal.SelectedValue);
            record_FamilyBaseInfo_model.F_LivestockBar = Convert.ToInt32(this.F_LivestockBar.SelectedValue);
            record_FamilyBaseInfo_model.F_ToiletType = Convert.ToInt32(this.F_ToiletType.SelectedValue);
            record_FamilyBaseInfo_model.F_ResponsibilityUserID = Convert.ToInt32(this.F_ResponsibilityUserID.Value);
            record_FamilyBaseInfo_model.F_FillingUserID = Convert.ToInt32(this.F_FillingUserID.Value);
            record_FamilyBaseInfo_model.F_UserID = Convert.ToInt32(this.F_UserID.Value);

            switch (CMD)
            {
                case "New":
                    CMD_Txt = "增加";
                    //如果是增加操作,就调用Add方法
                    record_FamilyBaseInfo_model.FamilyID = record_FamilyBaseInfo_bll.Add(record_FamilyBaseInfo_model);
                    Maticsoft.BLL.record_UserBaseInfo record_UserBaseInfo_bll = new Maticsoft.BLL.record_UserBaseInfo();
                    Maticsoft.Model.record_UserBaseInfo record_UserBaseInfo_model = record_UserBaseInfo_bll.GetModel(record_FamilyBaseInfo_model.F_UserID);
                    Maticsoft.BLL.sys_Group sys_Group_bll = new Maticsoft.BLL.sys_Group();
                    Maticsoft.Model.sys_Group sys_Group_model = sys_Group_bll.GetModel(record_UserBaseInfo_model.U_Committee);
                    string familyCode = sys_Group_model.G_Code + record_FamilyBaseInfo_model.FamilyID + "";
                    record_FamilyBaseInfo_model.F_FamilyCode = familyCode;
                    record_FamilyBaseInfo_bll.Update(record_FamilyBaseInfo_model);
                    record_UserBaseInfo_model.U_FamilyCode = familyCode;
                    record_UserBaseInfo_bll.Update(record_UserBaseInfo_model); //更新户主的家庭档案号
                    break;
                case "Edit":
                    CMD_Txt = "修改";
                    //如果是修改操作,就调用Update方法
                    record_FamilyBaseInfo_bll.Update(record_FamilyBaseInfo_model);
                    break;
            }
            All_Title_Txt = CMD_Txt + App_Txt;
            //以下方法的第4个参数需要更改
            EventMessage.MessageBox(1, "操作成功", string.Format("{1}ID({0})成功!", record_FamilyBaseInfo_model.FamilyID, All_Title_Txt), Icon_Type.OK, Common.GetHomeBaseUrl("default.aspx"));
        }
Example #6
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!Page.IsPostBack)
     {
         Maticsoft.BLL.sys_Group bll = new Maticsoft.BLL.sys_Group();
         if (Request.Params["id"] != null && Request.Params["id"].Trim() != "")
         {
             int GroupID = (Convert.ToInt32(Request.Params["id"]));
             bll.Delete(GroupID);
             Response.Redirect("list.aspx");
         }
     }
 }
Example #7
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!Page.IsPostBack)
     {
         Maticsoft.BLL.sys_Group bll=new Maticsoft.BLL.sys_Group();
         if (Request.Params["id"] != null && Request.Params["id"].Trim() != "")
         {
             int GroupID=(Convert.ToInt32(Request.Params["id"]));
             bll.Delete(GroupID);
             Response.Redirect("list.aspx");
         }
     }
 }
Example #8
0
 private void ShowInfo(int GroupID)
 {
     Maticsoft.BLL.sys_Group   bll   = new Maticsoft.BLL.sys_Group();
     Maticsoft.Model.sys_Group model = bll.GetModel(GroupID);
     this.lblGroupID.Text      = model.GroupID.ToString();
     this.lblG_CName.Text      = model.G_CName;
     this.lblG_ParentID.Text   = model.G_ParentID.ToString();
     this.lblG_ShowOrder.Text  = model.G_ShowOrder.ToString();
     this.lblG_Level.Text      = model.G_Level.ToString();
     this.lblG_ChildCount.Text = model.G_ChildCount.ToString();
     this.lblG_Delete.Text     = model.G_Delete.ToString();
     this.lblG_Type.Text       = model.G_Type.ToString();
     this.lblG_Code.Text       = model.G_Code;
 }
Example #9
0
 private void ShowInfo(int GroupID)
 {
     Maticsoft.BLL.sys_Group bll=new Maticsoft.BLL.sys_Group();
     Maticsoft.Model.sys_Group model=bll.GetModel(GroupID);
     this.lblGroupID.Text=model.GroupID.ToString();
     this.lblG_CName.Text=model.G_CName;
     this.lblG_ParentID.Text=model.G_ParentID.ToString();
     this.lblG_ShowOrder.Text=model.G_ShowOrder.ToString();
     this.lblG_Level.Text=model.G_Level.ToString();
     this.lblG_ChildCount.Text=model.G_ChildCount.ToString();
     this.lblG_Delete.Text=model.G_Delete.ToString();
     this.lblG_Type.Text=model.G_Type.ToString();
     this.lblG_Code.Text=model.G_Code;
 }
Example #10
0
        /// <summary>
        /// �������
        /// </summary>
        private void BindData()
        {
            categories = new string[]{"����ְ������ҽ�Ʊ���", "����������ҽ�Ʊ���", "ƶ������", "����ũ�����ҽ��", "��ҵҽ�Ʊ���", "ȫ����", "ȫ�Է�", "����"};
            string GroupIDs = "", strWhere = "";
            int[] datas = new int[8];
            int sum = 0, temp;
            Maticsoft.BLL.sys_Group sys_Group_bll = new Maticsoft.BLL.sys_Group();
            int groupID = UserData.GetUserDate.U_GroupID;
            if (UserData.GetUserDate.U_Type == 0)
                title = "ȫ��������������ͳ��";
            else
            {
                title = sys_Group_bll.GetModel(groupID).G_CName + "������������ͳ��";
                GroupIDs = sys_Group_bll.GetLowerLevelString_withSelf(groupID, false);
            }

            Maticsoft.BLL.sys_UserInfo sys_UserInfo_bll = new Maticsoft.BLL.sys_UserInfo();
            if (GroupIDs != "")
            {
                for (int i = 0; i < datas.Length; i++)
                {
                    strWhere = "U_PaymentType={0} and U_Committee in ({1})";
                    datas[i] = temp = sys_UserInfo_bll.GetRecordCount(string.Format(strWhere, i+1, GroupIDs));
                    sum += temp;
                }
            }
            else
            {
                strWhere = "U_PaymentType={0}";
                for (int i = 0; i < datas.Length; i++)
                {
                    strWhere = "U_PaymentType={0}";
                    datas[i] = temp = sys_UserInfo_bll.GetRecordCount(string.Format(strWhere, i+1));
                    sum += temp;
                }
            }

            for (int i = 0; i < datas.Length; i++)
            {
                if (i != 0)
                        data = data + ",";
                float per = (float)Math.Round((decimal)datas[i] / sum * 100,1);
                data = data + "{" + string.Format("y: {0}, color: colors[{1}]", per, i) + "}";
                table_data = table_data + string.Format("<tr class='body'><td>{0}</td><td>{1}</td><td>{2}%</td></tr>", categories[i], datas[i], per);
            }
        }
Example #11
0
		public void btnSave_Click(object sender, EventArgs e)
		{
			
			string strErr="";
			if(this.txtG_CName.Text.Trim().Length==0)
			{
				strErr+="分类中文说明不能为空!\\n";	
			}
			if(!PageValidate.IsNumber(txtG_ParentID.Text))
			{
				strErr+="上级分类ID0:为最高级格式错误!\\n";	
			}
			if(!PageValidate.IsNumber(txtG_ShowOrder.Text))
			{
				strErr+="显示顺序格式错误!\\n";	
			}
			if(!PageValidate.IsNumber(txtG_Level.Text))
			{
				strErr+="当前分类所在层数格式错误!\\n";	
			}
			if(!PageValidate.IsNumber(txtG_ChildCount.Text))
			{
				strErr+="当???分类子分类数格式错误!\\n";	
			}
			if(!PageValidate.IsNumber(txtG_Delete.Text))
			{
				strErr+="是否删除1:是0:否格式错误!\\n";	
			}
			if(!PageValidate.IsNumber(txtG_Type.Text))
			{
				strErr+="部门类型格式错误!\\n";	
			}
			if(this.txtG_Code.Text.Trim().Length==0)
			{
				strErr+="行政代码不能为空!\\n";	
			}

			if(strErr!="")
			{
				MessageBox.Show(this,strErr);
				return;
			}
			int GroupID=int.Parse(this.lblGroupID.Text);
			string G_CName=this.txtG_CName.Text;
			int G_ParentID=int.Parse(this.txtG_ParentID.Text);
			int G_ShowOrder=int.Parse(this.txtG_ShowOrder.Text);
			int G_Level=int.Parse(this.txtG_Level.Text);
			int G_ChildCount=int.Parse(this.txtG_ChildCount.Text);
			int G_Delete=int.Parse(this.txtG_Delete.Text);
			int G_Type=int.Parse(this.txtG_Type.Text);
			string G_Code=this.txtG_Code.Text;


			Maticsoft.Model.sys_Group model=new Maticsoft.Model.sys_Group();
			model.GroupID=GroupID;
			model.G_CName=G_CName;
			model.G_ParentID=G_ParentID;
			model.G_ShowOrder=G_ShowOrder;
			model.G_Level=G_Level;
			model.G_ChildCount=G_ChildCount;
			model.G_Delete=G_Delete;
			model.G_Type=G_Type;
			model.G_Code=G_Code;

			Maticsoft.BLL.sys_Group bll=new Maticsoft.BLL.sys_Group();
			bll.Update(model);
			Maticsoft.Common.MessageBox.ShowAndRedirect(this,"保存成功!","list.aspx");

		}
Example #12
0
        public void btnSave_Click(object sender, EventArgs e)
        {
            string strErr="";
            if(this.txtG_CName.Text.Trim().Length==0)
            {
                strErr+="分类中文说明不能为空!\\n";
            }
            if(!PageValidate.IsNumber(txtG_ParentID.Text))
            {
                strErr+="上级分类ID0:为最高级格式错误!\\n";
            }
            if(!PageValidate.IsNumber(txtG_ShowOrder.Text))
            {
                strErr+="显示顺序格式错误!\\n";
            }
            if(!PageValidate.IsNumber(txtG_Level.Text))
            {
                strErr+="当前分类所在层数格式错误!\\n";
            }
            if(!PageValidate.IsNumber(txtG_ChildCount.Text))
            {
                strErr+="当???分类子分类数格式错误!\\n";
            }
            if(!PageValidate.IsNumber(txtG_Delete.Text))
            {
                strErr+="是否删除1:是0:否格式错误!\\n";
            }
            if(!PageValidate.IsNumber(txtG_Type.Text))
            {
                strErr+="部门类型格式错误!\\n";
            }
            if(this.txtG_Code.Text.Trim().Length==0)
            {
                strErr+="行政代码不能为空!\\n";
            }

            if(strErr!="")
            {
                MessageBox.Show(this,strErr);
                return;
            }
            int GroupID=int.Parse(this.lblGroupID.Text);
            string G_CName=this.txtG_CName.Text;
            int G_ParentID=int.Parse(this.txtG_ParentID.Text);
            int G_ShowOrder=int.Parse(this.txtG_ShowOrder.Text);
            int G_Level=int.Parse(this.txtG_Level.Text);
            int G_ChildCount=int.Parse(this.txtG_ChildCount.Text);
            int G_Delete=int.Parse(this.txtG_Delete.Text);
            int G_Type=int.Parse(this.txtG_Type.Text);
            string G_Code=this.txtG_Code.Text;

            Maticsoft.Model.sys_Group model=new Maticsoft.Model.sys_Group();
            model.GroupID=GroupID;
            model.G_CName=G_CName;
            model.G_ParentID=G_ParentID;
            model.G_ShowOrder=G_ShowOrder;
            model.G_Level=G_Level;
            model.G_ChildCount=G_ChildCount;
            model.G_Delete=G_Delete;
            model.G_Type=G_Type;
            model.G_Code=G_Code;

            Maticsoft.BLL.sys_Group bll=new Maticsoft.BLL.sys_Group();
            bll.Update(model);
            Maticsoft.Common.MessageBox.ShowAndRedirect(this,"保存成功!","list.aspx");
        }
Example #13
0
 /// <summary>
 /// 通过部门id得到部门信息
 /// </summary>
 /// <param name="userID"></param>
 /// <returns></returns>
 public Maticsoft.Model.sys_Group getGroupModelById(int GroupID)
 {
     Maticsoft.BLL.sys_Group bll = new Maticsoft.BLL.sys_Group();
     Maticsoft.Model.sys_Group model = bll.GetModel(GroupID);
     return model;
 }
Example #14
0
        /// <summary>
        /// �����ѯ����Ҫ���ģ�
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void search_Click(object sender, EventArgs e)
        {
            string F_FamilyCode_Value = Convert.ToString(Common.sink(F_FamilyCode.UniqueID, MethodType.Post, 20, 0, DataType.Str));

            string SqlSearch = "";
            Maticsoft.BLL.sys_Group sys_Group_bll = new Maticsoft.BLL.sys_Group();
            Maticsoft.Model.sys_Group sys_Group_model = sys_Group_bll.GetModel(U_GroupID);
            SqlSearch = string.Format(" F_Committee in({0}) ", GroupIDs);
            if (F_FamilyCode_Value != "")
            {
                if (F_FamilyCode_Value != "")
                {
                    SqlSearch = " and " + SqlSearch + " F_FamilyCode like '%" + Common.inSQL(F_FamilyCode_Value) + "%'" + " ";
                }
            }

            ViewState["SearchTerms"] = SqlSearch;
            AspNetPager1.CurrentPageIndex = 1;
            BindData();
        }
Example #15
0
        /// <summary>
        /// �������
        /// </summary>
        private void BindData()
        {
            string GroupIDs = "", strWhere = "", manStr = "", womanStr ="", age_duration = "";
            Maticsoft.BLL.sys_Group sys_Group_bll = new Maticsoft.BLL.sys_Group();
            int groupID = UserData.GetUserDate.U_GroupID;
            int man_temp = 0, woman_temp = 0;
            if (UserData.GetUserDate.U_Type == 0)
                title = "ȫ�����������Ա�ֲ�ͳ��";
            else
            {
                title = sys_Group_bll.GetModel(groupID).G_CName + "���������Ա�ֲ�ͳ��";
                GroupIDs = sys_Group_bll.GetLowerLevelString_withSelf(groupID, false);  //���ص�ǰ���ŵ������¼�����
            }
            int year = DateTime.Now.Year;

            Maticsoft.BLL.sys_UserInfo sys_UserInfo_bll = new Maticsoft.BLL.sys_UserInfo();
            if (GroupIDs != "")
            {
                strWhere = "U_Sex={0} and U_BirthDay>'{1}-12-31' and U_BirthDay<='{2}-12-31' and U_Committee in ({3})";
                for (int i = 0; i <= 10; i++)
                {
                    if (i != 0)
                    {
                        manStr = manStr + ",";
                        womanStr = womanStr + ",";
                    }
                    man_temp = sys_UserInfo_bll.GetRecordCount(string.Format(strWhere, 1, year - (i + 1) * 10, year - i * 10, GroupIDs));
                    manStr = manStr + "-" + man_temp;
                    woman_temp = sys_UserInfo_bll.GetRecordCount(string.Format(strWhere, 0, year - (i + 1) * 10, year - i * 10, GroupIDs));
                    womanStr = womanStr + woman_temp;
                    if(i != 10)
                        age_duration = i * 10 + "-" + ((i + 1) * 10 - 1);
                    else
                        age_duration = "100+";
                    table_data = table_data + string.Format("<tr class='body'><td>{0}</td><td>{1}</td><td>{2}</td></tr>", age_duration, man_temp, woman_temp);
                }
            }
            else
            {
                strWhere = "U_Sex={0} and U_BirthDay>'{1}-12-31' and U_BirthDay<='{2}-12-31'";
                for (int i = 0; i <= 10; i++)
                {
                    if (i != 0)
                    {
                        manStr = manStr + ",";
                        womanStr = womanStr + ",";
                    }
                    man_temp = sys_UserInfo_bll.GetRecordCount(string.Format(strWhere, 1, year - (i + 1) * 10, year - i * 10));
                    manStr = manStr + "-" + man_temp;
                    woman_temp = sys_UserInfo_bll.GetRecordCount(string.Format(strWhere, 0, year - (i + 1) * 10, year - i * 10));
                    womanStr = womanStr + woman_temp;
                    if (i != 10)
                        age_duration = i * 10 + "-" + ((i + 1) * 10 - 1);
                    else
                        age_duration = "100+";
                    table_data = table_data + string.Format("<tr class='body'><td>{0}</td><td>{1}</td><td>{2}</td></tr>", age_duration, man_temp, woman_temp);
                }
            }
            man_data = string.Format("[{0}]", manStr);
            woman_data = string.Format("[{0}]", womanStr);
        }
Example #16
0
 /// <summary>
 /// 在编辑的时候将对应的值绑定到Label上
 /// </summary>
 private void InputData()
 {
     Maticsoft.BLL.education_Activity education_Activity_bll = new Maticsoft.BLL.education_Activity();
     Maticsoft.Model.education_Activity education_Activity_model = education_Activity_bll.GetModel(ActivityID);
     if (education_Activity_model != null)
     {
         A_DateTime.Text = education_Activity_model.A_DateTime.ToShortDateString();
         A_Location.Text = education_Activity_model.A_Location;
         Maticsoft.BLL.sys_Group sys_Group_bll = new Maticsoft.BLL.sys_Group();
         Maticsoft.Model.sys_Group sys_Group_model = sys_Group_bll.GetModel(education_Activity_model.A_Object);
         A_Object.Value = education_Activity_model.A_Object + "";
         A_Object_input.Text = sys_Group_model.G_CName;
         A_Crowd.Text = education_Activity_model.A_Crowd;
         A_Form.Text = education_Activity_model.A_Form;
         A_Duration.Text = education_Activity_model.A_Duration + "";
         A_Organizers.Text = education_Activity_model.A_Organizers;
         A_Partners.Text = education_Activity_model.A_Partners;
         A_Missionary.Text = education_Activity_model.A_Missionary;
         A_Number.Text = education_Activity_model.A_Number + "";
         A_Theme.Text = education_Activity_model.A_Theme;
     }
 }
Example #17
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 #18
0
        private void OutJs()
        {
            int GroupID = currentUser.U_GroupID;
            int TotalRecord = 0;
            string strLink = "";
            int intCount = 0;
            Maticsoft.BLL.sys_Group sys_Group_bll = new Maticsoft.BLL.sys_Group();
            Maticsoft.Model.sys_Group sys_Group_model = sys_Group_bll.GetModel(GroupID);
            string GroupIDs = "";
            if (UserData.Get_sys_UserTable(currentUser.UserID).U_Type == 0) //�ж��û��Ƿ�Ϊ�����û�
                GroupIDs = "";
            else
                GroupIDs = sys_Group_bll.GetLowerLevelString_withSelf(GroupID, false);
            QueryParam qp = new QueryParam();
            if (GroupIDs != "")
            {
                qp.Where = string.Format("Where G_Delete={0} and G_Type={1} and GroupID in({2})", 0, G_Type, GroupIDs);
            }
            else
            {
                qp.Where = string.Format("Where G_Delete={0} and G_Type={1}", 0, G_Type);
            }
            qp.Orderfld = "G_Level,G_ShowOrder";
            qp.OrderType = 0;
            ArrayList lst = BusinessFacade.sys_GroupList(qp, out TotalRecord);
            StringBuilder strSB = new StringBuilder();

            strSB.Append("<script language='JavaScript'>\n");
            strSB.Append("Fold_id='';\n");

            if (G_Type == 1) //�����ҽԺ
            {
                strSB.Append("treeRoot = gFld(\"mainbody\", \"ҽԺ�б�\", \"0\",\"0\")\n");
                List<Maticsoft.Model.sys_Group> list_all = sys_Group_bll.GetHigherLevel_withSelf(lst, false);
                for (int i = list_all.Count -1; i >=0; i--)
                {
                    intCount = intCount + 1;
                    //strLink = "GroupList.aspx?GroupID=" + x.GroupID.ToString();
                    strLink = list_all[i].GroupID.ToString();
                    if (list_all[i].G_Level == 1)
                    {
                        if (list_all[i].G_ChildCount == 0)
                        {
                            strSB.AppendFormat("insDoc(treeRoot,gLnk(\"mainbody\",\"{0}\",\"\",{1}))\n", Common.ReplaceJs(list_all[i].G_CName), strLink);
                        }
                        else
                        {
                            strSB.AppendFormat("N{0}=insFld(treeRoot,gFld(\"mainbody\",\"{1}\",\"\",{2}))\n", list_all[i].GroupID, Common.ReplaceJs(list_all[i].G_CName), strLink);
                        }
                    }
                    else
                    {
                        if (list_all[i].G_ChildCount == 0)
                        {
                            strSB.AppendFormat("insDoc(N{0},gLnk(\"mainbody\",\"{1}\",\"\",{2}))\n", list_all[i].G_ParentID, Common.ReplaceJs(list_all[i].G_CName), strLink);
                        }
                        else
                        {
                            strSB.AppendFormat("N{0}=insFld(N{1},gFld(\"mainbody\",\"{2}\",\"\",{3}))\n", list_all[i].GroupID, list_all[i].G_ParentID, Common.ReplaceJs(list_all[i].G_CName), strLink);
                        }
                    }
                }
            }
            else
            {
                strSB.Append("treeRoot = gFld(\"mainbody\", \"�����б�\", \"0\",\"0\")\n");
                foreach (sys_GroupTable x in lst)
                {
                    intCount = intCount + 1;
                    //strLink = "GroupList.aspx?GroupID=" + x.GroupID.ToString();
                    strLink = x.GroupID.ToString();
                    if (x.G_Level == sys_Group_model.G_Level)
                    {
                        if (x.G_ChildCount == 0)
                        {
                            strSB.AppendFormat("insDoc(treeRoot,gLnk(\"mainbody\",\"{0}\",\"\",{1}))\n", Common.ReplaceJs(x.G_CName), strLink);
                        }
                        else
                        {
                            strSB.AppendFormat("N{0}=insFld(treeRoot,gFld(\"mainbody\",\"{1}\",\"\",{2}))\n", x.GroupID, Common.ReplaceJs(x.G_CName), strLink);
                        }
                    }
                    else
                    {
                        if (x.G_ChildCount == 0)
                        {
                            strSB.AppendFormat("insDoc(N{0},gLnk(\"mainbody\",\"{1}\",\"\",{2}))\n", x.G_ParentID, Common.ReplaceJs(x.G_CName), strLink);
                        }
                        else
                        {
                            strSB.AppendFormat("N{0}=insFld(N{1},gFld(\"mainbody\",\"{2}\",\"\",{3}))\n", x.GroupID, x.G_ParentID, Common.ReplaceJs(x.G_CName), strLink);
                        }
                    }
                }
            }

            strSB.Append("	initializeDocument();\n");
            strSB.Append("</script>\n");
            ShowScript.Text = strSB.ToString();
        }