Example #1
0
        public static void AddMailOfWFInfo(WF_GetMailOfWFInfo info)
        {
            DataTable dt = GetMailOfWFInfoBySN(info.SN, info.ApproveLeaderEmail);

            if (dt == null || dt.Rows.Count == 0)
            {
                InsertMailInfoOfWFInfo(info);
            }
            else
            {
                UpdateMailInfoOfWFInfo(info.SN, info.Status);
            }
        }
Example #2
0
        public static DataTable InsertMailInfoOfWFInfo(WF_GetMailOfWFInfo info)
        {
            DataProvider dataProvider = new DataProvider();

            dataProvider.ConnectionString = connectionString;// System.Configuration.ConfigurationManager.ConnectionStrings["BPMConnectionString"].ConnectionString;
            SqlParameter[] parameters = new SqlParameter[] {
                new SqlParameter("@InstanceID", System.Data.SqlDbType.NVarChar, 100),
                new SqlParameter("@SN", System.Data.SqlDbType.NVarChar, 20),
                new SqlParameter("@FormTitle", System.Data.SqlDbType.NVarChar, 300),
                new SqlParameter("@ApproveLeader", System.Data.SqlDbType.NVarChar, 2000),
                new SqlParameter("@Status", System.Data.SqlDbType.NVarChar, 10),
                new SqlParameter("@ApproveLeaderEmail", System.Data.SqlDbType.NVarChar, 300)
            };
            parameters[0].Value = info.InstanceID;
            parameters[1].Value = info.SN;
            parameters[2].Value = info.FormTitle;
            parameters[3].Value = info.ApproveLeader;
            parameters[4].Value = info.Status;
            parameters[5].Value = info.ApproveLeaderEmail;

            DataTable dataTable = dataProvider.ExecutedProcedure("wf_usp_InsertMailInfoOfWF", parameters);

            return(dataTable);
        }