예제 #1
0
        public void Logout(int id)
        {
            List <SqlParameter> parameters = new List <SqlParameter>()
            {
                new SqlParameter {
                    ParameterName = "@InsId",
                    Value         = id
                }
            };

            procedure.StoredProc("Logout", parameters);
        }
예제 #2
0
        public void AddMessage(UserMessage message)
        {
            List <SqlParameter> parameters = new List <SqlParameter>()
            {
                new SqlParameter()
                {
                    ParameterName = "@Text",
                    Value         = message.Message
                },
                new SqlParameter()
                {
                    ParameterName = "@TimeSend",
                    Value         = message.TimeSend
                },
                new SqlParameter()
                {
                    ParameterName = "@InstructorSender",
                    Value         = message.InstructorSender
                },
                new SqlParameter()
                {
                    ParameterName = "@InstructorReciver",
                    Value         = message.InstructorReciever
                },
                new SqlParameter()
                {
                    ParameterName = "@RecieverFName",
                    Value         = message.RecieverFName
                },
                new SqlParameter()
                {
                    ParameterName = "@SenderFName",
                    Value         = message.SenderFName
                }
                , new SqlParameter()
                {
                    ParameterName = "@From",
                    Value         = "From" + message.InstructorSender
                }
                ,
                new SqlParameter()
                {
                    ParameterName = "@Type",
                    Value         = message.Type
                }
            };
            ProcedureForInserting procedure = new ProcedureForInserting();

            procedure.StoredProc("AddMessage", parameters);
        }
예제 #3
0
        //---------------------------Template for stored procedure
        public bool ChangePassword(string password, Guid uniqueId)
        {
            ProcedureForInserting procedureForInserting =
                new ProcedureForInserting();


            List <SqlParameter> parameters = new List <SqlParameter>()
            {
                new SqlParameter()
                {
                    ParameterName = "@Password",
                    Value         = password,
                },
                new SqlParameter()
                {
                    ParameterName = "@GUID",
                    Value         = uniqueId
                }
            };

            return(procedureForInserting.StoredProc("spChangedPassword", parameters));
        }