예제 #1
0
 public cls_Partner()
 {
     DB_Gateway = new Sql_Gateway();
 }
예제 #2
0
 public ParameterValues()
 {
     DB_Gateway = new Sql_Gateway();
 }
 // empty constructor
 public DashboardEinvoiceMail()
 {
     DB_Gateway = new Sql_Gateway();
 }
 // empty constructor
 public DashboardUserRights()
 {
     DB_Gateway = new Sql_Gateway();
 }
예제 #5
0
 // empty constructor
 public DashboardLog()
 {
     DB_Gateway = new Sql_Gateway();
 }
예제 #6
0
 // empty constructor
 public dbProcess()
 {
     DB_Gateway = new Sql_Gateway();
 }
예제 #7
0
 public bool GetAllActiveUserForUserId(string connectionString, string pUserId)
 {
     using (System.Data.SqlClient.SqlConnection connection = new System.Data.SqlClient.SqlConnection(connectionString))
     {
         List<DashboardUser> DashboardUserList = new List<DashboardUser>();
         using (System.Data.SqlClient.SqlCommand cmd = new System.Data.SqlClient.SqlCommand())
         {
             cmd.CommandText = @" SELECT UserId, UserName, Password, Email, Name, Surname,
                                         Mission, Telephone, ImageName, Active
                                  FROM DashboardUser
                                  WHERE Active = 1
                                  AND UserId = @pUserId";
             cmd.Parameters.AddWithValue("@pUserId", pUserId);
             using (DataTable dt = new Sql_Gateway().ExecuteDataTable(cmd, connection))
             {
                 if (dt.Rows.Count > 0)
                 {
                     foreach (DataRow dr in dt.Rows)
                     {
                         TransferToClass(dr);
                         return true;
                     }
                 }
             }
             if (connection != null) connection.Close();
             return false;
         }
     }
 }
예제 #8
0
 public bool authenticateForLockScreen(string connectionString, string p_Password)
 {
     using (System.Data.SqlClient.SqlConnection connection = new System.Data.SqlClient.SqlConnection(connectionString))
     {
         using (System.Data.SqlClient.SqlCommand cmd = new System.Data.SqlClient.SqlCommand())
         {
             cmd.CommandText = @"SELECT * FROM  DashboardUser
                                          WHERE Password = @pPassword
                                          AND   Active = 1";
             cmd.Parameters.AddWithValue("@pPassword", p_Password);
             using (DataTable dt = new Sql_Gateway().ExecuteDataTable(cmd, connection))
             {
                 if (dt.Rows.Count > 0)
                 {
                     foreach (DataRow dr in dt.Rows)
                     {
                         TransferToClass(dr);
                         return true;
                     }
                 }
             }
             return false;
         }
     }
 }