Exemplo n.º 1
0
        /// <summary>
        /// 获取界面数据
        /// </summary>
        /// <param name="model"></param>
        private void GetFormValue(Shoolar_apply_check model)
        {
            switch (user.User_Role)
            {
            case "S":                     //学生
                model.CHECK_STEP   = "1"; //学生已核对
                model.S_CHECK_CODE = user.User_Id;
                model.S_CHECK_NAME = user.User_Name;
                model.S_CHECK_TIME = GetDateLongFormater();
                break;

            case "F":                     //辅导员
                model.CHECK_STEP   = "2"; //辅导员已核对
                model.F_CHECK_CODE = user.User_Id;
                model.F_CHECK_NAME = user.User_Name;
                model.F_CHECK_TIME = GetDateLongFormater();
                break;

            case "Y":                     //学院
                model.CHECK_STEP   = "3"; //学院已核对
                model.Y_CHECK_CODE = user.User_Id;
                model.Y_CHECK_NAME = user.User_Name;
                model.Y_CHECK_TIME = GetDateLongFormater();
                break;
            }
            model.OLD_BANKCODE = Post("OLD_BANKCODE");
            model.NEW_BANKCODE = Post("NEW_BANKCODE");
            model.OLD_IDCARDNO = Post("OLD_IDCARDNO");
            model.NEW_IDCARDNO = Post("NEW_IDCARDNO");
            model.REMARK       = Post("REMARK");
            model.REMARK_Y     = Post("REMARK_Y");
        }
Exemplo n.º 2
0
        /// <summary>
        /// 删除数据
        /// </summary>
        /// <returns></returns>
        private string DeleteData()
        {
            string strOID = Get("id");

            if (string.IsNullOrEmpty(strOID))
            {
                return("OID为空,不允许删除操作");
            }
            Shoolar_apply_check head = new Shoolar_apply_check();

            head.OID = strOID;
            ds.RetrieveObject(head);
            var transaction = ImplementFactory.GetDeleteTransaction <Shoolar_apply_check>("Shoolar_apply_checkDeleteTransaction");

            transaction.EntityList.Add(head);

            if (!transaction.Commit())
            {
                return("删除失败!");
            }

            return(string.Empty);
        }
Exemplo n.º 3
0
        /// <summary>
        /// 批量确认核对信息
        /// </summary>
        /// <returns></returns>
        private string MultiCheck()
        {
            try
            {
                DataTable dtMultiCheck = GetMultiCheckData();
                if (dtMultiCheck == null)
                {
                    return("批量核对失败:批量核对数据读取失败!");
                }
                int nSuccessNum = 0;
                int nFailNum    = 0;
                foreach (DataRow row in dtMultiCheck.Rows)
                {
                    #region 筛选可以核对信息的数据

                    //筛选可以核对信息的数据
                    if (row == null)
                    {
                        continue;
                    }
                    string strMsg = string.Empty;
                    if (!ProjectCheckHandleClass.getInstance().IsCanCheck(row["OID"].ToString(), user.User_Role, "multi", out strMsg))
                    {
                        nFailNum++;
                        continue;
                    }

                    #endregion 筛选可以核对信息的数据

                    #region 更新核对信息

                    Shoolar_apply_head head = new Shoolar_apply_head();
                    head.OID = row["OID"].ToString();
                    ds.RetrieveObject(head);
                    if (head == null)
                    {
                        continue;
                    }

                    Shoolar_apply_check check = ProjectCheckHandleClass.getInstance().GetApplyCheckInfo(head.SEQ_NO);
                    check.OID = check.OID;
                    ds.RetrieveObject(check);

                    #region 批量核对时,也需要校验学生核对情况

                    if (head.PROJECT_CLASS.Equals("LIFE"))
                    {
                        //学生需要有饭卡号,银行卡号才可以核对通过
                        if (StuHandleClass.getInstance().ByStuNoGetRiceCard(head.STU_NUMBER).Length == 0)
                        {
                            nFailNum++;
                            continue;
                        }
                        if (check.OLD_BANKCODE.Length == 0 && check.NEW_BANKCODE.Length == 0)
                        {
                            nFailNum++;
                            continue;
                        }
                    }
                    else
                    {
                        //学生需要有银行卡号,身份证号 才可以核对通过
                        if (check.OLD_BANKCODE.Length == 0 && check.NEW_BANKCODE.Length == 0)
                        {
                            nFailNum++;
                            continue;
                        }
                        if (check.OLD_IDCARDNO.Length == 0 && check.NEW_IDCARDNO.Length == 0)
                        {
                            nFailNum++;
                            continue;
                        }
                    }

                    #endregion 批量核对时,也需要校验学生核对情况

                    switch (user.User_Role)
                    {
                    case "F":                     //辅导员
                        check.CHECK_STEP   = "2"; //辅导员已核对
                        check.F_CHECK_CODE = user.User_Id;
                        check.F_CHECK_NAME = user.User_Name;
                        check.F_CHECK_TIME = GetDateLongFormater();
                        break;

                    case "Y":                     //学院
                        check.CHECK_STEP   = "3"; //学院已核对
                        check.Y_CHECK_CODE = user.User_Id;
                        check.Y_CHECK_NAME = user.User_Name;
                        check.Y_CHECK_TIME = GetDateLongFormater();
                        break;
                    }
                    ds.UpdateObject(check);
                    nSuccessNum++;

                    #endregion 更新核对信息

                    #region  步学生信息中的银行卡与身份证号,修改成核对后的数据

                    if (check.CHECK_STEP.Equals("3"))
                    {
                        #region 银行卡

                        if (check.NEW_BANKCODE.Length > 0)
                        {
                            head.STU_BANKCODE = check.NEW_BANKCODE;
                            //更新至学生银行卡信息中的银行卡号
                            string strSqlBank = string.Format("UPDATE BASIC_STU_BANK_INFO SET BANKCODE = '{0}' WHERE NUMBER = '{1}' ", head.STU_BANKCODE, head.STU_NUMBER);
                            ds.ExecuteTxtNonQuery(strSqlBank);
                        }

                        #endregion 银行卡

                        #region 身份证

                        if (check.NEW_IDCARDNO.Length > 0)
                        {
                            head.STU_IDCARDNO = check.NEW_IDCARDNO;
                            //更新至学生信息中的身份证号
                            string strSqlID = string.Format("UPDATE BASIC_STU_INFO SET IDCARDNO = '{0}' WHERE NUMBER = '{1}' ", head.STU_IDCARDNO, head.STU_NUMBER);
                            ds.ExecuteTxtNonQuery(strSqlID);
                        }

                        #endregion 身份证

                        ds.UpdateObject(head);
                    }

                    #endregion  步学生信息中的银行卡与身份证号,修改成核对后的数据
                }
                return(string.Format("批量核对成功:生效{0}条记录,不生效{1}条记录。", nSuccessNum, nFailNum));
            }
            catch (Exception ex)
            {
                LogDBHandleClass.getInstance().LogException(CValue.LOG_LEVEL_ERROR, "批量审批奖助核对失败:" + ex.ToString());
                return("批量核对失败!");
            }
        }
Exemplo n.º 4
0
        /// <summary>
        /// 保存数据
        /// </summary>
        /// <returns></returns>
        private string SaveData()
        {
            bool bFlag = false;
            //新增
            Shoolar_apply_check head = new Shoolar_apply_check();

            if (string.IsNullOrEmpty(Post("CHECK_OID")))
            {
                head.OID = Guid.NewGuid().ToString();
                ds.RetrieveObject(head);
                head.SEQ_NO = Post("hidApplySeqNo");
                GetFormValue(head);
                var inserttrcn = ImplementFactory.GetInsertTransaction <Shoolar_apply_check>("Shoolar_apply_checkInsertTransaction", user.User_Name);
                inserttrcn.EntityList.Add(head);
                if (inserttrcn.Commit())
                {
                    bFlag = true;
                }
            }
            else //修改
            {
                head.OID = Post("CHECK_OID");
                ds.RetrieveObject(head);
                GetFormValue(head);
                var updatetrcn = ImplementFactory.GetUpdateTransaction <Shoolar_apply_check>("Shoolar_apply_checkUpdateTransaction", user.User_Name);
                if (updatetrcn.Commit(head))
                {
                    bFlag = true;
                }
            }
            if (bFlag)
            {
                #region 保存成功之后,修改的 学生信息 同步更新至学生个人信息中

                //ZZ 20171213 修改:保存成功之后,修改的 手机号 同步更新至学生个人信息中
                Dictionary <string, string> param = new Dictionary <string, string>();
                param.Add("SEQ_NO", head.SEQ_NO);
                Shoolar_apply_head apply = ProjectApplyHandleClass.getInstance().GetApplyHeadInfo(param);
                if (apply != null)
                {
                    //手机号
                    if (!string.IsNullOrWhiteSpace(Post("STU_PHONE")))
                    {
                        StuHandleClass.getInstance().ByStuNumberUpStuInfo_Phone(apply.STU_NUMBER, Post("STU_PHONE"));
                    }
                    //ZZ 20180319 修改:保存成功之后,修改的 学籍状态以及异动时间 同步更新至学生个人信息中
                    if (!string.IsNullOrWhiteSpace(Post("STU_REGISTER")))
                    {
                        StuHandleClass.getInstance().ByStuNumberUpStuInfo_Register(apply.STU_NUMBER, Post("STU_REGISTER"));
                    }
                    if (!string.IsNullOrWhiteSpace(Post("STU_DIFFDATE")))
                    {
                        StuHandleClass.getInstance().ByStuNumberUpStuInfo_DiffDate(apply.STU_NUMBER, Post("STU_DIFFDATE"));
                    }
                    if (!string.IsNullOrWhiteSpace(Post("STU_RICE_CARD")))
                    {
                        StuHandleClass.getInstance().ByStuNumberUpStuInfo_RiceCard(apply.STU_NUMBER, Post("STU_RICE_CARD"));
                    }
                }

                #endregion 保存成功之后,修改的 学生信息 同步更新至学生个人信息中

                return(string.Empty);
            }
            else
            {
                return("保存核对信息失败!");
            }
        }