Ejemplo n.º 1
0
 public DataTable GetDatas()
 {
     try
     {
         dt = dbcon.Execute_Query("Select ID,FIRST_NAME, SECOND_NAME,ISACTIVE from Datas order by ID", "Datas").Tables[0];
     }
     catch (Exception ex)
     {
         throw ex;
     }
     return(dt);
 }
Ejemplo n.º 2
0
        public DataTable GetDetailsByID()
        {
            DataTable dt = new DataTable();

            try
            {
                dt = dbcon.Execute_Query("UPDATE USERS SET LAST_LOGIN=GETDATE() WHERE ID=" + IntLoginID + "; select US.ID,US.NAME,US.USERNAME,US.MOBILE,US.LAST_LOGIN,US.ISACTIVE from USERS  US where US.ID=" + IntLoginID + "", "USERS").Tables[0];
            }
            catch (Exception ex)
            {
                ExceptionHandling.CatchAndLogError(ex, "Error while trying to GetDetailsByID()", "HomeController.cs", DataBaseClass.Global.StrLoginName, "indexModel.cs", "GetDetailsByID()");
            }
            return(dt);
        }