Example #1
0
        /// <summary> 更改流程内容
        /// </summary>
        /// <param name="cid">合同id</param>
        /// <param name="plan">进度</param>
        public string updateFlow(string cid, string plan)
        {
            try
            {
                SqlAgent sa = new SqlAgent(SysConfiguration.GetErpSqlConn());
                sa.addParameterDB("F_3517_09", "getdate()", "");
                sa.addParameterString("F_3517_22", "系统自动完成", 100, false, "");
                sa.addParameterNumber("F_3517_18", 1, "");
                sa.addCondition("F_3517_03", cid, CompareType.Equal, LogicType.none, "");
                sa.addCondition("F_3517_18", 1, CompareType.NotEqual, LogicType.And, "");
                if (plan == emContractSpan.资料收齐.GetHashCode().ToString())
                {
                    sa.addCondition("F_3517_06", "备齐按揭资料", CompareType.Equal, LogicType.And, "");
                }
                if (plan == emContractSpan.审批通过.GetHashCode().ToString())
                {
                    //sa.addDBCondition("F_3517_06", "'按揭审批通过领取按揭合同','商业按揭审批通过'", CompareType.In, "");
                    //sa.addCondition("F_3517_06", "商业按揭审批通过", CompareType.Equal, LogicType.And, "");
                    sa.whereAppend = " (F_3517_06 = '商业按揭审批通过' or F_3517_06 = '按揭审批通过')";
                }
                sa.update("T_3517");


                sa.addSelect("F_3517_04");
                DataTable dt = sa.@select("T_3517");
                sa.whereAppend = "";
                if (dt == null || dt.Rows.Count < 1)
                {
                    return("");
                }
                sa = new SqlAgent(SysConfiguration.GetErpSqlConn());
                sa.addParameterDB("F_3517_08", "DATEADD(day,1,getdate())", "");
                sa.addCondition("F_3517_03", cid, CompareType.Equal, LogicType.none, "");
                sa.addCondition("F_3515_07", dt.Rows[0]["F_3517_04"].ToString(), CompareType.Equal, LogicType.And, "");
                return(sa.update("T_3517"));
            }
            catch (Exception ex)
            {
                return(ex.ToString());
            }
        }
Example #2
0
 /// <summary> 修改合同进度
 /// </summary>
 /// <param name="contactid"></param>
 /// <param name="plan"></param>
 public string updatePlan(string contactid, string plan, string username)
 {
     try
     {
         SqlAgent sa = new SqlAgent(SysConfiguration.GetErpSqlConn());
         sa.addParameterNumber("F_8057_71", int.Parse(plan), "");
         if (int.Parse(plan) == emContractSpan.已接收.GetHashCode())
         {
             sa.addParameterString("F_8057_87", username, 100, false, "");
             sa.addParameterString("F_8057_85", DateTime.Now.ToString(), 100, false, "");
         }
         if (int.Parse(plan) == emContractSpan.揭办理.GetHashCode())
         {
             sa.addParameterString("F_8057_95", DateTime.Now.ToString(), 100, false, "");
         }
         if (int.Parse(plan) == emContractSpan.资料收齐.GetHashCode())
         {
             sa.addParameterString("F_8057_96", DateTime.Now.ToString(), 100, false, "");
         }
         if (int.Parse(plan) == emContractSpan.审批通过.GetHashCode())
         {
             sa.addParameterString("F_8057_97", DateTime.Now.ToString(), 100, false, "");
         }
         if (int.Parse(plan) == emContractSpan.借款合同已移交.GetHashCode())
         {
             sa.addParameterString("F_8057_98", DateTime.Now.ToString(), 100, false, "");
         }
         if (int.Parse(plan) == emContractSpan.已退件.GetHashCode())
         {
             sa.addParameterString("F_8057_99", DateTime.Now.ToString(), 100, false, "");
         }
         sa.addCondition("F_8057_02", contactid, CompareType.Equal, LogicType.none, "");
         sa.addCondition("F_8057_78", ElectroniContracType.其他.GetHashCode(), CompareType.Equal, LogicType.And, "");
         return(sa.update("T_8057"));
     }
     catch (Exception ex)
     {
         return(ex.Message);
     }
 }