public static void InsertMessage(ENTREQREQUESTDETAIL rqstdtl)
        {
            try
            {
                con = SQL.GetConnection();
                if (con.State == ConnectionState.Closed)
                {
                    con.Open();
                }
                cmd = SQL.SetCommand("INSERT INTO REQ_REQUESTDETAIL (ID,REQUESTID,USERID,MESSAGE,DATE) VALUES (@ID,@REQUESTID,@USERID,@MESSAGE,@DATE)", con);
                cmd.Parameters.AddWithValue("@ID", rqstdtl.ID);
                cmd.Parameters.AddWithValue("@REQUESTID", rqstdtl.REQUESTID);
                cmd.Parameters.AddWithValue("@USERID", rqstdtl.USERID);
                cmd.Parameters.AddWithValue("@MESSAGE", rqstdtl.MESSAGE);
                cmd.Parameters.AddWithValue("@DATE", rqstdtl.DATE);

                cmd.ExecuteNonQuery();
            }
            catch (Exception ex)
            {
            }
            finally
            {
                if (con.State == ConnectionState.Open)
                {
                    con.Close();
                }
            }
        }
        public static List <ENTREQREQUESTDETAIL> GetAllListRequestDetailsID(Guid REQUESTID)
        {
            con = SQL.GetConnection();
            cmd = SQL.SetCommand("SELECT * FROM REQ_REQUESTDETAIL WHERE REQUESTID=@REQUESTID", con);
            cmd.Parameters.AddWithValue("@REQUESTID", REQUESTID);
            con.Open();
            SqlDataReader              dr       = cmd.ExecuteReader();
            ENTREQREQUESTDETAIL        ptsk     = null;
            List <ENTREQREQUESTDETAIL> ptsklist = new List <ENTREQREQUESTDETAIL>();

            while (dr.Read())
            {
                ptsk = new ENTREQREQUESTDETAIL(Guid.Parse(dr["ID"].ToString()), Guid.Parse(dr["REQUESTID"].ToString()), Guid.Parse(dr["USERID"].ToString()), dr["MESSAGE"].ToString(), Convert.ToDateTime(dr["DATE"].ToString()));
                ptsklist.Add(ptsk);
            }
            con.Close();

            return(ptsklist);
        }