示例#1
0
        private string DeleteMember()
        {
            bool   bDel = false;
            string oid  = Get("oid");

            if (string.IsNullOrEmpty(oid))
            {
                return("主键为空,不允许删除!");
            }

            Dst_family_members m = new Dst_family_members();

            m.OID = oid;
            ds.RetrieveObject(m);
            var transaction = ImplementFactory.GetDeleteTransaction <Dst_family_members>("Dst_family_membersDeleteTransaction");

            transaction.EntityList.Add(m);
            bDel = transaction.Commit();
            if (bDel)
            {
                string msg;
                if (!FamilySurveyHandleClass.getInstance().CalculateIncome(m.SEQ_NO, out msg))
                {
                    msg = "计算家庭年收入异常";
                }
                return(msg);
            }

            return("删除失败!");
        }
示例#2
0
 private string SaveMember()
 {
     try
     {
         Dst_family_members member = new Dst_family_members();
         member.OID = Post("OID");
         if (member.OID == "")
         {
             member.OID = Guid.NewGuid().ToString();
         }
         ds.RetrieveObject(member);
         member.SEQ_NO      = Get("seq_no");
         member.NAME        = Post("NAME");
         member.AGE         = Post("AGE");
         member.RELATION    = Post("MEMBER_RELATION_TEXT") == "" ? Post("RELATION") : Post("MEMBER_RELATION_TEXT");
         member.WORKPLACE   = Post("WORKPLACE");
         member.PROFESSION  = Post("MEMBER_PROFESSION_TEXT") == "" ? Post("PROFESSION") : Post("MEMBER_PROFESSION_TEXT");
         member.INCOME      = comTran.ToDecimal(Post("INCOME"));
         member.HEALTH      = Post("HEALTH");//Post("MEMBER_HEALTH_TEXT") == "" ? Post("HEALTH") : Post("MEMBER_HEALTH_TEXT");
         member.IDCARDNO    = Post("IDCARDNO");
         member.DISA_DEGREE = Post("MEMBER_DISA_DEGREE");
         member.EDU_LEVEL   = Post("MEMBER_EDU_LEVEL");
         ds.UpdateObject(member);
         string msg;
         if (!FamilySurveyHandleClass.getInstance().CalculateIncome(member.SEQ_NO, out msg))
         {
             msg = "计算家庭年收入异常";
         }
         return(member.OID);
     }
     catch (Exception)
     {
         return("");
     }
 }
示例#3
0
        private string DeclData()
        {
            string msg = SaveData();

            if (msg.Length > 0)
            {
                var oid = Post("OID");
                if (string.IsNullOrEmpty(oid))
                {
                    return("主键为空,不允许提交");
                }

                head.OID = oid;
                ds.RetrieveObject(head);
                msg = CheckFamilyInfo(head.SEQ_NO) + CheckMembers(head.SEQ_NO);
                if (msg.Length > 0)
                {
                    return(msg);
                }
                //学生个人信息是否审核通过
                if (!ComHandleClass.getInstance().IsPassStudentModify(head.NUMBER))
                {
                    return("个人信息修改未审核通过,不允许提交");
                }

                //家庭调查表提交后不需要流转
                Wkf_rule_queue rule = WKF_RuleQueueHandleCLass.getInstance().GetCurrRule(HQ.Model.CValue.DOC_TYPE_BDM04, WKF_VLAUES.DECLARE_TYPE_D, HQ.Model.CValue.STEP_A0, HQ.Model.CValue.RET_CHANNEL_A0010, user.User_Role);
                if (rule == null)
                {
                    msg = "没有权限提交";
                }
                else
                {
                    head.OP_CODE   = user.User_Id;
                    head.OP_NAME   = user.User_Name;
                    head.OP_TIME   = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss");
                    head.DECL_TIME = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss");
                    //提交时,插入一条文档编号
                    ComHandleClass.getInstance().InsertIntoBasicStuWordNo(head.NUMBER, head.SCHYEAR);
                    head.SERIAL_NO   = ComHandleClass.getInstance().GetStuWorNo(head.NUMBER, head.SCHYEAR);
                    head.RET_CHANNEL = HQ.Model.CValue.RET_CHANNEL_A0010;
                    ds.UpdateObject(head);

                    //增加一条记录
                    if (!FamilySurveyHandleClass.getInstance().CreateRecord(head))
                    {
                        msg = "提交成功,但生成调查记录失败";
                    }
                }
            }
            else
            {
                msg = "提交失败";
            }

            return(msg);
        }
示例#4
0
        private string CreateNewData()
        {
            string         strNumber = Get("number");
            Basic_stu_info stu       = new Basic_stu_info();

            head = FamilySurveyHandleClass.getInstance().GetDst_family_situa(new Dictionary <string, string> {
                { "NUMBER", strNumber }
            });
            if (head == null)
            {
                head = new Dst_family_situa();
                object o = ds.ExecuteTxtScalar(string.Format("SELECT OID FROM Basic_stu_info WHERE NUMBER = '{0}'", strNumber));
                if (o != null && o.ToString().Trim().Length > 0)
                {
                    string OID = Guid.NewGuid().ToString();
                    stu.OID = o.ToString();
                    ds.RetrieveObject(stu);
                    head.NUMBER      = stu.NUMBER;
                    head.NAME        = stu.NAME;
                    head.SEX         = stu.SEX;
                    head.BIRTH_DATE  = stu.GARDE;
                    head.NATION      = stu.NATION;
                    head.IDCARDNO    = stu.IDCARDNO;
                    head.POLISTATUS  = stu.POLISTATUS;
                    head.COLLEGE     = stu.COLLEGE;
                    head.MAJOR       = stu.MAJOR;
                    head.CLASS       = stu.CLASS;
                    head.GRADE       = stu.EDULENTH;
                    head.NATIVEPLACE = stu.NATIVEPLACE;
                    head.OID         = OID;
                    head.SEQ_NO      = GetSeq_no();
                    head.DOC_TYPE    = this.Doc_type;
                    head.RET_CHANNEL = Ret_Channel_A0000;
                    head.SCHYEAR     = sch_info.CURRENT_YEAR;
                    head.OP_TIME     = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss");
                    head.OP_CODE     = user.User_Id;
                    head.OP_NAME     = user.User_Name;
                    head.ADDRESS     = stu.ADDRESS;
                    head.POSTCODE    = stu.POSTCODE;
                    head.TELEPHONE   = stu.HOMENUM;
                    var inserttrcn = ImplementFactory.GetInsertTransaction <Dst_family_situa>("Dst_family_situaInsertTransaction");
                    inserttrcn.EntityList.Add(head);
                    inserttrcn.Commit();
                }
                else
                {
                    return("获取学生基本信息失败!");
                }
            }

            return(GetApplyData(head.OID));
        }
示例#5
0
 private string GetIncome(string number)
 {
     if (!string.IsNullOrEmpty(number))
     {
         Dst_family_situa situa = FamilySurveyHandleClass.getInstance().GetDst_family_situa(new Dictionary <string, string> {
             { "NUMBER", number }
         });
         if (situa != null)
         {
             head.SERIAL_NO = situa.SERIAL_NO;
             DataTable dt = ds.ExecuteTxtDataTable(string.Format("SELECT SUM(INCOME) INCOME,COUNT(1) QTY FROM DST_FAMILY_MEMBERS WHERE SEQ_NO='{0}'", situa.SEQ_NO));
             if (dt != null && dt.Rows.Count == 1)
             {
                 head.ANNUAL_INCOME  = comTran.ToDecimal(dt.Rows[0]["INCOME"].ToString());
                 head.MONTHLY_INCOME = (situa.FAMILY_SIZE > 0) ? Math.Round(head.ANNUAL_INCOME / situa.FAMILY_SIZE / 12, 2) : 0;
             }
         }
     }
     return(head.ANNUAL_INCOME.ToString() + "*" + head.MONTHLY_INCOME.ToString());
 }
示例#6
0
        private decimal GetIncome(string number, string type)
        {
            decimal income = 0;
            string  total  = FamilySurveyHandleClass.getInstance().CalculateIncomeByNumber(number);

            string[] arr_total = total.Split('*');
            if (arr_total.Length < 2)
            {
                return(0);
            }
            if (type.Equals("year"))
            {
                income = comTran.ToDecimal(arr_total[0]);
            }
            else if (type.Equals("month"))
            {
                income = comTran.ToDecimal(arr_total[1]);
            }

            return(income);
        }
示例#7
0
        private string CheckDeclare(string strNumber)
        {
            string msg = string.Empty;

            if (strNumber.Length == 0)
            {
                return("学号为空");
            }

            //校验家庭成员的身份证号码是否填写完全
            msg = FamilySurveyHandleClass.getInstance().CheckMembersIDCard(strNumber);
            if (msg.Length > 0)
            {
                msg = "家庭成员的身份证号码未填写完全,请在家庭情况调查表中补充";
            }

            //学生个人信息是否审核通过
            if (msg.Length == 0 && !comHandle.IsPassStudentModify(strNumber))
            {
                msg = "个人信息修改未审核通过,不允许提交";
            }

            return(msg);
        }
示例#8
0
        private void GetPrintData(string oid)
        {
            head.OID = oid;
            ds.RetrieveObject(head);
            head.OPINION1 = cod.GetDDLTextByValue("ddl_dst_opinion", head.OPINION1);
            strGrant      = GetStudentGrant(head.SEQ_NO);
            GetFamilyMembers();//家庭成员

            #region 民主评议推荐档次
            if (head.LEVEL1 == "A")
            {
                strLevel1 = "▉";
                strLevel2 = "□";
                strLevel3 = "□";
                strLevel4 = "□";
            }
            else if (head.LEVEL1 == "B")
            {
                strLevel1 = "□";
                strLevel2 = "▉";
                strLevel3 = "□";
                strLevel4 = "□";
            }
            else if (head.LEVEL1 == "C")
            {
                strLevel1 = "□";
                strLevel2 = "□";
                strLevel3 = "▉";
                strLevel4 = "□";
            }
            else if (head.LEVEL1 == "D")
            {
                strLevel1 = "□";
                strLevel2 = "□";
                strLevel3 = "□";
                strLevel4 = "▉";
            }
            else
            {
                strLevel1 = "□";
                strLevel2 = "□";
                strLevel3 = "□";
                strLevel4 = "□";
            }
            #endregion 民主评议推荐档次

            #region 档次、意见
            //二级
            if (string.IsNullOrEmpty(head.LEVEL2))
            {
                strAgree2   = "□";
                strNAgree2  = "□";
                strOpinion2 = "          ";
            }
            else
            {
                if (head.LEVEL1 == head.LEVEL2)
                {
                    strAgree2   = "▉";
                    strNAgree2  = "□";
                    strOpinion2 = "          ";
                }
                else
                {
                    strAgree2   = "□";
                    strNAgree2  = "▉";
                    strOpinion2 = cod.GetDDLTextByValue("ddl_dst_level", head.LEVEL2);
                }
            }
            //三级
            if (string.IsNullOrEmpty(head.LEVEL3))
            {
                strAgree3   = "□";
                strNAgree3  = "□";
                strOpinion3 = "          ";
            }
            else
            {
                if (head.LEVEL2 == head.LEVEL3)
                {
                    strAgree3   = "▉";
                    strNAgree3  = "□";
                    strOpinion3 = "          ";
                }
                else
                {
                    strAgree3   = "□";
                    strNAgree3  = "▉";
                    strOpinion3 = cod.GetDDLTextByValue("ddl_dst_level", head.LEVEL3);
                }
            }
            #endregion 档次、意见

            #region 家庭经济特别困难勾选项
            situa = FamilySurveyHandleClass.getInstance().GetDst_family_situa(new Dictionary <string, string> {
                { "NUMBER", head.NUMBER }
            });
            if (head.LEVEL_CODE == "A" && situa != null)
            {
                if (situa.IS_POOR.Equals("G") || situa.IS_POOR.Equals("O"))//农村建档立卡
                {
                    strNCJDLK = "▉";
                }
                else
                {
                    strNCJDLK = "□";
                }
                if (situa.IS_MINIMUM == "Y")//低保家庭
                {
                    strDBJT = "▉";
                }
                else
                {
                    strDBJT = "□";
                }
                if (situa.IS_ORPHAN.Equals("Y"))//孤儿
                {
                    strguer = "▉";
                }
                else
                {
                    strguer = "□";
                }
                if (situa.IS_DISABLED.Equals("Y"))//残疾
                {
                    strcanji = "▉";
                }
                else
                {
                    strcanji = "□";
                }
                if (situa.IS_OTHER.Equals("Y") || situa.IS_DESTITUTE.Equals("Y"))//其他
                {
                    strqita = "▉";
                }
                else
                {
                    strqita = "□";
                }
            }
            else
            {
                strNCJDLK = "□";
                strDBJT   = "□";
                strguer   = "□";
                strcanji  = "□";
                strqita   = "□";
            }
            #endregion 家庭经济特别困难勾选项
        }