Exemplo n.º 1
0
        public List <Users> allUsersTbl()
        {
            SqlCommand   cmd  = new SqlCommand("SELECT * FROM UsersTbl", DALUtil.getConnection());
            List <Users> temp = FetchData(cmd);

            return(temp);
        }
Exemplo n.º 2
0
        public List <Logs> allLogs()
        {
            SqlCommand  cmd  = new SqlCommand("SELECT * FROM LogReporting", DALUtil.getConnection());
            List <Logs> temp = FetchData(cmd);

            return(temp);
        }
Exemplo n.º 3
0
        public List <Feedbacks> allFeedbacks()
        {
            SqlCommand       cmd  = new SqlCommand("SELECT * FROM Feedbacks", DALUtil.getConnection());
            List <Feedbacks> temp = FetchData(cmd);

            return(temp);
        }
Exemplo n.º 4
0
        public List <ServiceReportings> allSp()
        {
            SqlCommand cmd = new SqlCommand("SELECT * FROM Service_Reporting", DALUtil.getConnection());
            List <ServiceReportings> temp = FetchData(cmd);

            return(temp);
        }
Exemplo n.º 5
0
        public List <ServiceInformations> allSi()
        {
            SqlCommand cmd = new SqlCommand("SELECT * FROM Service_Information", DALUtil.getConnection());
            List <ServiceInformations> temp = fetchData(cmd);

            return(temp);
        }
Exemplo n.º 6
0
        public List <PortalUsers> allPu()
        {
            SqlCommand         cmd  = new SqlCommand("SELECT * FROM portal_users", DALUtil.getConnection());
            List <PortalUsers> temp = FetchData(cmd);

            return(temp);
        }
Exemplo n.º 7
0
        public List <PushNotifications> allPn()
        {
            SqlCommand cmd = new SqlCommand("SELECT * FROM push_notifications", DALUtil.getConnection());
            List <PushNotifications> temp = fetchData(cmd);

            return(temp);
        }
Exemplo n.º 8
0
        public UserProfile selectUserLogin(string userID, string loginPassword)
        {
            SqlCommand cmd = new SqlCommand("SELECT * FROM loginUsers WHERE username = @Id AND password = @Password", DALUtil.getConnection());

            cmd.Parameters.AddWithValue("@Id", userID);
            cmd.Parameters.AddWithValue("@Password", loginPassword);
            List <UserProfile> temp = fetchFeeStructures(cmd);

            return((temp != null) ? temp[0] : null);
        }
Exemplo n.º 9
0
        public PortalUsers getSingleUser(string userName, string passWord)
        {
            SqlCommand cmd = new SqlCommand("SELECT * FROM portal_users where username like @Username and pass_word like @Password", DALUtil.getConnection());

            cmd.Parameters.AddWithValue("@Username", userName);
            cmd.Parameters.AddWithValue("@Password", passWord);
            List <PortalUsers> temp = FetchData(cmd);

            return((temp != null) ? temp[0] : null);
        }
Exemplo n.º 10
0
        public void AddPortalUser(PortalUsers pu)
        {
            SqlCommand cmd = new SqlCommand("INSERT INTO [dbo].[portal_users] ([username],[pass_word],[user_type]) VALUES (@Username,@Password,@UserType)", DALUtil.getConnection());

            cmd.Parameters.AddWithValue("@Username", (pu.Username == null) ? Convert.DBNull : pu.Username);
            cmd.Parameters.AddWithValue("@Password", (pu.Password == null) ? Convert.DBNull : pu.Password);
            cmd.Parameters.AddWithValue("@UserType", (pu.UserType == null) ? Convert.DBNull : pu.UserType);
            executeCommand(cmd);
        }
Exemplo n.º 11
0
        public ContentManagements GetTermConditionsAndPrivacyPolicy()
        {
            SqlCommand cmd = new SqlCommand("SELECT TOP 1 id, terms_and_conditions, privacy_and_policy FROM content_management", DALUtil.getConnection());
            List <ContentManagements> temp = fetchData(cmd);

            return((temp != null) ? temp[0] : null);
        }
Exemplo n.º 12
0
        public void UpdatePrivacyandPolicy(ContentManagements uc)
        {
            SqlCommand cmd = new SqlCommand("Update content_management Set privacy_and_policy=@PrivacyAndPolicy Where id=1", DALUtil.getConnection());

            cmd.Parameters.AddWithValue("@PrivacyAndPolicy", (uc.PrivacyAndPolicy == null) ? Convert.DBNull : uc.PrivacyAndPolicy);
            executeCommand(cmd);
        }
Exemplo n.º 13
0
        public void UpdateTermsAndConditions(ContentManagements uc)
        {
            SqlCommand cmd = new SqlCommand("Update content_management Set terms_and_conditions=@TermsAndConditions Where id= 1", DALUtil.getConnection());

            cmd.Parameters.AddWithValue("@TermsAndConditions", (uc.TermsAndConditions == null) ? Convert.DBNull : uc.TermsAndConditions);
            executeCommand(cmd);
        }
Exemplo n.º 14
0
        public void AddCms(ContentManagements c)
        {
            SqlCommand cmd = new SqlCommand("INSERT into content_management (terms_and_conditions,privacy_and_policy) VALUES (@TermsAndConditions,@PrivacyAndPolicy)", DALUtil.getConnection());

            cmd.Parameters.AddWithValue("@TermsAndConditions", (c.TermsAndConditions == null) ? Convert.DBNull : c.TermsAndConditions);
            cmd.Parameters.AddWithValue("@PrivacyAndPolicy", (c.PrivacyAndPolicy == null) ? Convert.DBNull : c.PrivacyAndPolicy);
            executeCommand(cmd);
        }
Exemplo n.º 15
0
        public void AddPushNotification(PushNotifications p)
        {
            SqlCommand cmd = new SqlCommand("INSERT INTO [dbo].[push_notifications] ([title],[desc]) VALUES (@Title,@Descp)", DALUtil.getConnection());

            cmd.Parameters.AddWithValue("@Title", (p.Title == null) ? Convert.DBNull : p.Title);
            cmd.Parameters.AddWithValue("@Descp", (p.Descp == null) ? Convert.DBNull : p.Descp);
            executeCommand(cmd);
        }