//public int SaveMessagesForNotAppUser(string adminEmailAddress, string name, string phone, string subject, string message)
        //{
        //    DIBZ.Common.Model.MyQueries myQuery = new DIBZ.Common.Model.MyQueries();
        //    myQuery.Email = adminEmailAddress;
        //    myQuery.Name = name;
        //    myQuery.PhoneNo = phone;
        //    myQuery.Subject = subject;
        //    myQuery.Message = message;
        //    myQuery.QueryStatus = QueryStatus.Open;
        //    myQuery.IsActive = true;
        //    DIBZ.Common.Model.MyQueryDetails myQueryDetails = new DIBZ.Common.Model.MyQueryDetails();
        //    myQueryDetails.Message = message;
        //    myQueryDetails.myquery = myQuery;
        //    Db.Add(myQueryDetails);
        //    return Db.Save();

        //}



        //save conversation message via Admin or ApplicationUser
        public int SaveConversationForAppUser(int queryId, string Message)
        {
            DIBZ.Common.Model.MyQueryDetails queryLogs = new DIBZ.Common.Model.MyQueryDetails();
            queryLogs.MyQueryId = queryId;
            queryLogs.Message   = Message;
            queryLogs.IsActive  = true;
            Db.Add(queryLogs);
            return(Db.Save());
        }
 //save Contact us form data for Application User
 public int SaveMessages(string adminEmailAddress, string name, string phone, string subject, string message, int?appuserid)
 {
     DIBZ.Common.Model.MyQueries myQuery = new DIBZ.Common.Model.MyQueries();
     myQuery.AppUserId   = appuserid;
     myQuery.Email       = adminEmailAddress;
     myQuery.Name        = name;
     myQuery.PhoneNo     = phone;
     myQuery.Subject     = subject;
     myQuery.Message     = message;
     myQuery.QueryStatus = QueryStatus.Open;
     myQuery.IsActive    = true;
     DIBZ.Common.Model.MyQueryDetails myQueryDetails = new DIBZ.Common.Model.MyQueryDetails();
     myQueryDetails.Message = message;
     myQueryDetails.myquery = myQuery;
     Db.Add(myQueryDetails);
     return(Db.Save());
 }