private void BindUserDetails()
 {
     try
     {
         DataTable dt     = new DataTable();
         int       status = 0;
         if (!string.IsNullOrEmpty(UserId.Value))
         {
             dt = objDb.GetUserDetails(Convert.ToInt32(UserId.Value == string.Empty ? 0 :
                                                       Convert.ToInt32(UserId.Value)), 0);
             if (dt != null && dt.Rows.Count > 0)
             {
                 txtusername.Value = dt.Rows[0]["USER_NAME"].ToString();
                 txtpwd.Value      = dt.Rows[0]["User_Password"].ToString();
                 ddlUserRole.Value = dt.Rows[0]["LOGINROLE"].ToString();
                 status            = Convert.ToInt16(dt.Rows[0]["Status"].ToString());
                 setVisibility(status);
             }
         }
     }
     catch (Exception)
     {
         throw;
     }
 }
 private void BindUsers()
 {
     try
     {
         DataTable dt = new DataTable();
         dt = objDb.GetUserDetails(0, 1);
         if (dt != null && dt.Rows.Count > 0)
         {
             gvUSer.DataSource = dt;
             gvUSer.DataBind();
         }
         else
         {
             DataTable emptydt = new DataTable();
             gvUSer.DataSource = dt;
             gvUSer.DataBind();
         }
     }
     catch (Exception)
     {
         throw;
     }
 }