示例#1
0
        public bool AddMNotification(MNotification mnotification)
        {
            SqlCommand cmd;

            cmd             = new SqlCommand();
            cmd.CommandType = CommandType.StoredProcedure;
            cmd.CommandText = "AddMNotification";

            cmd.Parameters.AddWithValue("@NotifyNo", mnotification.NotifyNo);

            cmd.Parameters.AddWithValue("@NotifyType", mnotification.NotifyType);

            cmd.Parameters.AddWithValue("@NotifyMessage", mnotification.NotifyMessage);

            cmd.Parameters.AddWithValue("@NotifyDate", mnotification.NotifyDate);

            cmd.Parameters.AddWithValue("@NotifyStatus", mnotification.NotifyStatus);

            cmd.Parameters.AddWithValue("@NotifyFileName", mnotification.NotifyFileName);

            cmd.Parameters.AddWithValue("@CompanyNo", mnotification.CompanyNo);

            commandcollection.Add(cmd);
            return(true);
        }
示例#2
0
        public bool UpdateNotification(MNotification mnotification)
        {
            SqlCommand cmd;

            cmd             = new SqlCommand();
            cmd.CommandType = CommandType.Text;
            cmd.CommandText = "Update MNotification set NotifyStatus=@NotifyStatus ,StatusNo=2 where NotifyNo=@NotifyNo";

            cmd.Parameters.AddWithValue("@NotifyNo", mnotification.NotifyNo);

            cmd.Parameters.AddWithValue("@NotifyStatus", mnotification.NotifyStatus);

            commandcollection.Add(cmd);
            return(true);
        }