예제 #1
0
        /// <summary>
        /// 按揭资料数据添加
        /// </summary>
        /// <param name="buycode">买方资料</param>
        /// <param name="sellcode">卖方资料</param>
        /// <param name="contrsctid">合同ID</param>
        /// <param name="codetype">缺失/收到</param>
        public void insertcode(string buycode, string sellcode, string contrsctid, string codetype)
        {
            SqlAgent sa = new SqlAgent(SysConfiguration.GetErpSqlConn());
            Guid     id = Guid.NewGuid();

            sa.addParameterString("F_8100_01", id.ToString(), 50, false, "");
            sa.addParameterString("F_8100_02", contrsctid, 50, false, "");
            sa.addParameterString("F_8100_03", buycode, 2000, false, "");
            sa.addParameterString("F_8100_04", sellcode, 2000, false, "");
            if (codetype != "")
            {
                sa.addParameterDB("F_8100_05", codetype, "");
            }
            sa.addParameterString("F_8100_08", DateTime.Now.ToString(), 100, false, "");
            sa.addParameterString("F_992", DateTime.Now.ToString(), 100, false, "");
            sa.addParameterString("F_993", "0", 10, false, "");
            sa.insert("T_8100");
        }
예제 #2
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());
            }
        }