コード例 #1
0
 /// <summary>
 /// Insert Group Settings
 /// </summary>
 /// <param name="ObjConn">SqlConnection</param>
 /// <param name="ObjSqlCommmand">SqlCommand</param>
 /// <param name="GroupID">GroupID</param>
 /// <param name="ExpiryTime">ExpiryTime</param>
 /// <param name="RoutingType">RoutingType</param>
 /// <param name="RoutingTime">RoutingTime</param>
 /// <param name="LastModifiedBy">LastModifiedBy</param>
 /// <returns></returns>
 public string InsertGroupSettings(Conn ObjConn, SqlCommand ObjSqlCommmand, int GroupID, int ExpiryTime, string RoutingType, int RoutingTime, string LastModifiedBy)
 {
     return ObjConn.executescalarstringquery(ObjSqlCommmand, " INSERT INTO [GroupSettings]([GroupID],[ExpiryTime],[RoutingType],[RoutingTime],[Created],[LastModifiedBy])"
                                            + " VALUES (" + GroupID + "," + ExpiryTime + ",'" + RoutingType + "'," + RoutingTime + ",GETDATE(),'"
                                            + LastModifiedBy + "')"
                                            + " Select @@IDENTITY");
 }
コード例 #2
0
 public string CreateMessageHistory(Conn ObjConn, SqlCommand ObjSqlCommmand, int MessageID, string InquiryID, int FromUserID, string ExecutiveIP, int ToUserID,int MessageSequence,
                                    Int16 MessageRead)
 {
     return ObjConn.executescalarstringquery(ObjSqlCommmand, "INSERT INTO [MessageHistory]([MessageID],[ExecutiveIP],[CustomerID],[MessageSequence],[MessageRead])"
                                            + " VALUES (" + MessageID.ToString() + ",'" + InquiryID + "'," + FromUserID.ToString() + ",'" + ExecutiveIP + "'," + MessageSequence.ToString() + "','"
                                            + MessageRead.ToString() + ")" + " Select @@IDENTITY");
 }
コード例 #3
0
    /// <summary>
    /// Create User
    /// </summary>
    /// <param name="ObjConn"></param>
    /// <param name="ObjSqlCommmand"></param>
    /// <param name="Login"></param>
    /// <param name="Password"></param>
    /// <param name="Status"></param>
    /// <param name="OnlineStatus"></param>
    /// <param name="RoleID"></param>
    /// <param name="Email"></param>
    /// <param name="Name"></param>
    /// <param name="Address"></param>
    /// <param name="Photo"></param>
    /// <param name="SessionID"></param>
    /// <param name="LastModifiedBy"></param>
    /// <returns></returns>
    public string CreateUser(Conn ObjConn,SqlCommand ObjSqlCommmand, string Login, string Password, string Status, string OnlineStatus, int RoleID, string Email,string Name,
                           string Address,string Photo,string SessionID,string LastModifiedBy)
    {
        try
        {

        }
        catch (SqlException ex)
        {

        }

        return ObjConn.executescalarstringquery(ObjSqlCommmand, " INSERT INTO [User]([Login],[Password],[Status],[OnlineStatus],[RoleID],[Email],[Name],[Address],[Photo],[SessionID],[Created],[LastModifiedBy])"
                                               +" VALUES ('" + Login + "','" + Password +"','" + Status + "','" + OnlineStatus + "'," +RoleID+ ",'" + Email + "','" + Name + "','"
                                               + Address + "','" + Photo + "','" + SessionID + "','" + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "','" + LastModifiedBy + "')"
                                               + " Select @@IDENTITY");
    }
コード例 #4
0
 /// <summary>
 /// Delete Group
 /// </summary>
 /// <param name="ObjConn">SqlConnection</param>
 /// <param name="ObjSqlCommmand">SqlCommand</param>
 /// <param name="GroupID">GroupID</param>
 /// <returns></returns>
 public string DeleteGroup(Conn ObjConn, SqlCommand ObjSqlCommmand, int GroupID)
 {
     return ObjConn.executescalarstringquery(ObjSqlCommmand, "DELETE from [Group] output deleted.GroupID where [GroupID] = " + GroupID.ToString());
 }
コード例 #5
0
 /// <summary>
 /// Delete Gorup Settings
 /// </summary>
 /// <param name="ObjConn">SqlConnection</param>
 /// <param name="ObjSqlCommmand">SqlCommand</param>
 /// <param name="GroupID">GroupID</param>
 /// <returns></returns>
 public string DeleteGorupSettings(Conn ObjConn, SqlCommand ObjSqlCommmand, int GroupID)
 {
     return ObjConn.executescalarstringquery(ObjSqlCommmand, "Delete from [GroupSettings] output deleted.GroupID where [GroupID] = " + GroupID);
 }
コード例 #6
0
 /// <summary>
 /// Create Group
 /// </summary>
 /// <param name="ObjConn">SqlConnection</param>
 /// <param name="ObjSqlCommmand">SqlCommand</param>
 /// <param name="GroupName">GroupName</param>
 /// <param name="GroupEmail">GroupEmail</param>
 /// <param name="Status">Status</param>
 /// <param name="LastModifiedBy">LastModifiedBy</param>
 /// <returns></returns>
 public string CreateGroup(Conn ObjConn, SqlCommand ObjSqlCommmand, string GroupName, string GroupEmail, string Status,string LastModifiedBy)
 {
     return ObjConn.executescalarstringquery(ObjSqlCommmand, "INSERT INTO [Group]([GroupName],[GroupEmail],[Status],[Created],[LastModifiedBy])"
                                            + " VALUES ('" + GroupName + "','" + GroupEmail + "','" + Status + "',GETDATE(),'"
                                            + LastModifiedBy + "')"+ " Select @@IDENTITY");
 }
コード例 #7
0
 /// <summary>
 /// Update Group Settings
 /// </summary>
 /// <param name="ObjConn">SqlConnection</param>
 /// <param name="ObjSqlCommmand">SqlCommand</param>
 /// <param name="GroupID">GroupID</param>
 /// <param name="ExpiryTime">ExpiryTime</param>
 /// <param name="RoutingType">RoutingType</param>
 /// <param name="RoutingTime">RoutingTime</param>
 /// <param name="LastModifiedBy">LastModifiedBy</param>
 /// <returns></returns>
 public string UpdateGroupSettings(Conn ObjConn, SqlCommand ObjSqlCommmand, int GroupID, int ExpiryTime, string RoutingType, int RoutingTime, string LastModifiedBy)
 {
     return ObjConn.executescalarstringquery(ObjSqlCommmand, " UPDATE [GroupSettings] SET [ExpiryTime] = '" + ExpiryTime + "',[RoutingType]='" + RoutingType + "',"
                                            + "[RoutingTime]=" + RoutingTime + ",[Modified]=GETDATE(),[LastModifiedBy]='" + LastModifiedBy + "'"
                                            + " output inserted.GroupID  where [GroupID] =" + GroupID);
 }
コード例 #8
0
 /// <summary>
 /// Update Group
 /// </summary>
 /// <param name="ObjConn">SqlConnection</param>
 /// <param name="ObjSqlCommmand">SqlCommand</param>
 /// <param name="GroupName">GroupName</param>
 /// <param name="GroupEmail">GroupEmail</param>
 /// <param name="Status">Status</param>
 /// <param name="LastModifiedBy">LastModifiedBy</param>
 /// <returns></returns>
 public string UpdateGroup(Conn ObjConn, SqlCommand ObjSqlCommmand,int GroupID, string GroupName, string GroupEmail, string Status, string LastModifiedBy)
 {
     return ObjConn.executescalarstringquery(ObjSqlCommmand, "UPDATE [Group] SET [GroupName] = '" + GroupName + "',[GroupEmail]='" + GroupEmail + "',[Status]='" + Status
                                            + "',[Modified]=GETDATE(),[LastModifiedBy]='"
                                            + LastModifiedBy + "' output inserted.GroupID where GroupID = " + GroupID.ToString());
 }
コード例 #9
0
 /// <summary>
 /// Insert User Settings
 /// </summary>
 /// <param name="ObjConn">SqlConnection</param>
 /// <param name="ObjSqlCommmand">SqlCommand</param>
 /// <param name="UserID">UserID</param>
 /// <param name="AttentionSound">AttentionSound</param>
 /// <param name="NewMessageSound">NewMessageSound</param>
 /// <param name="ThemeID">ThemeID</param>
 /// <param name="LastModifiedBy">LastModifiedBy</param>
 /// <returns></returns>
 public string InsertUserSettings(Conn ObjConn, SqlCommand ObjSqlCommmand, int UserID, string AttentionSound, string NewMessageSound, int ThemeID,string LastModifiedBy)
 {
     return ObjConn.executescalarstringquery(ObjSqlCommmand, " INSERT INTO [UserSettings]([UserID],[AttentionSound],[NewMessageSound],[ThemeID],[Created],[LastModifiedBy])"
                                            + " VALUES (" + UserID + ",'" + AttentionSound + "','" + NewMessageSound + "'," + ThemeID + ","
                                            + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "','" + LastModifiedBy + "')"
                                            + " Select @@IDENTITY");
 }
コード例 #10
0
 /// <summary>
 /// Delete User Settings
 /// </summary>
 /// <param name="ObjConn">SqlConnection</param>
 /// <param name="ObjSqlCommmand">SqlCommand</param>
 /// <param name="UserID">UserID</param>
 /// <returns>UserID</returns>
 public string DeleteUserSettings(Conn ObjConn, SqlCommand ObjSqlCommmand, int UserID)
 {
     return ObjConn.executescalarstringquery(ObjSqlCommmand, "Delete from [UserSettings] output deleted.UserID where [UserID] = " + UserID);
 }
コード例 #11
0
 public string UpdateUserSettings(Conn ObjConn, SqlCommand ObjSqlCommmand, int UserID, string AttentionSound, string NewMessageSound, int ThemeID, string LastModifiedBy)
 {
     return ObjConn.executescalarstringquery(ObjSqlCommmand, " UPDATE [UserSettings] SET [AttentionSound] = '" + AttentionSound + "',[NewMessageSound]='" + NewMessageSound + "',"
                                            + "[ThemeID]=" + ThemeID + ",[Modified]='" + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "',[LastModifiedBy]='" + LastModifiedBy + "'"
                                            + " output inserted.UserID where [UserID] =" + UserID);
 }
コード例 #12
0
 /// <summary>
 /// Update User
 /// </summary>
 /// <param name="ObjConn"></param>
 /// <param name="ObjSqlCommmand"></param>
 /// <param name="Password"></param>
 /// <param name="Status"></param>
 /// <param name="OnlineStatus"></param>
 /// <param name="RoleID"></param>
 /// <param name="Email"></param>
 /// <param name="Name"></param>
 /// <param name="Address"></param>
 /// <param name="Photo"></param>
 /// <param name="SessionID"></param>
 /// <param name="LastModifiedBy"></param>
 /// <returns></returns>
 public string UpdateUser(Conn ObjConn, SqlCommand ObjSqlCommmand,int UserID, string Password, string Status, string OnlineStatus, int RoleID, string Email, string Name,
                        string Address, string Photo, string SessionID, string LastModifiedBy)
 {
     return ObjConn.executescalarstringquery(ObjSqlCommmand, " UPDATE [User]  SET [Password] = '" + Password + "',[Status] = '" + Status + "',[OnlineStatus] = '" + OnlineStatus + "',[RoleID] = " + RoleID
                                            + ",[Email] = '" + Email + "',[Name] = '" + Name + "',[Address] = '" + Address + "',[Photo] = '" + Photo + "',[SessionID] = '" + SessionID + "',"
                                            + "[Modified] = '" + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "',[LastModifiedBy] = '" + LastModifiedBy
                                            + "' output inserted.UserID where [UserID] = " + UserID.ToString());
 }
コード例 #13
0
 /// <summary>
 /// Create User Group
 /// </summary>
 /// <param name="ObjConn">SqlConnection</param>
 /// <param name="ObjSqlCommmand">SqlCommand</param>
 /// <param name="GroupID">GroupID</param>
 /// <param name="UserID">UserID</param>
 /// <param name="LastModifiedBy">LastModifiedBy</param>
 /// <returns></returns>
 public string CreateUserGroup(Conn ObjConn, SqlCommand ObjSqlCommmand, int GroupID,int UserID, string LastModifiedBy)
 {
     return ObjConn.executescalarstringquery(ObjSqlCommmand, "INSERT INTO [GroupsToUsers]([GroupID],[UserID],[Created],[LastModifiedBy])"
                                            + " VALUES (" + GroupID + "," + UserID + ",'" +  DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "','"
                                            + LastModifiedBy + "')" + " Select @@IDENTITY");
 }
コード例 #14
0
 public string UpdateMessageHistory(Conn ObjConn, SqlCommand ObjSqlCommmand, int MessageID, int ExecutiveID, string ExecutiveIP, int CustomerID, int MessageSequence, Int16 MessageRead)
 {
     return ObjConn.executescalarstringquery(ObjSqlCommmand, "UPDATE [Message] SET [ExecutiveID] = " + ExecutiveID.ToString() + ",[ExecutiveIP] = '" + ExecutiveIP
                                            + "',[CustomerID] = " + CustomerID.ToString() + ",[MessageSequence] = " + MessageSequence.ToString() + ",[MessageRead] =" + MessageRead.ToString() + " VALUES (" + ExecutiveID.ToString() + ",'" + ExecutiveIP + "'," + CustomerID.ToString() + "," + MessageSequence.ToString() + "','"
                                            + " output inserted.MessageID where MessageID = " + MessageID);
 }
コード例 #15
0
 public string DeleteMessage(Conn ObjConn, SqlCommand ObjSqlCommmand, int MessageID)
 {
     return ObjConn.executescalarstringquery(ObjSqlCommmand, "DELETE from [Message] output deleted.MessageID where MessageID = " + MessageID);
 }
コード例 #16
0
 /// <summary>
 /// Create Reply
 /// </summary>
 /// <param name="ObjConn">SqlConnection</param>
 /// <param name="ObjSqlCommmand">SqlCommand</param>
 /// <param name="GroupID">GroupID</param>
 /// <param name="UserID">UserID</param>
 /// <param name="ReplyName">ReplyName</param>
 /// <param name="ReplyDesc">ReplyDesc</param>
 /// <param name="ReplyType">ReplyType</param>
 /// <returns></returns>
 public string CreateReply(Conn ObjConn, SqlCommand ObjSqlCommmand, int GroupID, int UserID, string ReplyName, string ReplyDesc, string ReplyType)
 {
     return ObjConn.executescalarstringquery(ObjSqlCommmand, "INSERT INTO [Reply]([GroupID],[UserID],[ReplyName],[ReplyDesc],[ReplyType])"
                                            + " VALUES (" + GroupID.ToString() + "," + UserID.ToString() + ",'" + ReplyName + "','" + ReplyDesc + "','"
                                            + ReplyType + "')" + " Select @@IDENTITY");
 }