Esempio n. 1
0
        /// <summary>
        /// 新增活動通知信件
        /// </summary>
        /// <param name="Mail"></param>
        /// <param name="Subject"></param>
        /// <param name="Body"></param>
        /// <param name="Assigner"></param>
        /// <param name="Deadline"></param>
        public static void InsertActivityNotifyMail(string Mail, string Subject, string Body, string Assigner, string Deadline)
        {
            SqlConnection conn = new SqlConnection("Data Source=140.116.177.79;Initial Catalog=NewVersionHintsDB;User ID=hints;Password=mirac");

            conn.Open();
            string command = "INSERT INTO AssignCaseMailRemindList(cAssignID,cAssigner,cMailSubject,cMailBody,cMailTo,dDeadline,cSystem,nStatus) VALUES(";

            command += "'" + MLASUtil.GetNewID("") + "','" + Assigner + "','" + Subject + "','" + Body + "','" + Mail + "','" + Deadline + "','MLAS', 0)";
            SqlCommand cmd     = new SqlCommand(command, conn);
            int        iExcute = cmd.ExecuteNonQuery();

            conn.Close();
        }
Esempio n. 2
0
        /// <summary>
        /// Convert string to display format, the input string format should be 'yyyyMMddHHmmss'.
        /// </summary>
        /// <param name="hintsTime">yyyyMMddHHmmss</param>
        /// <returns>display format as string</returns>
        public static string ConvertHintsTimeToDisplay(string hintsTime)
        {
            DateTime dtHintsTime = MLASUtil.ConvertHintsTimeToDateTime(hintsTime);

            return(dtHintsTime.ToString(clsMLASConfig.TimeDisplayFormat, System.Globalization.DateTimeFormatInfo.InvariantInfo));
        }