Exemplo n.º 1
0
        public DataTable InsertUserEntry(PL_UserCreation pl)
        {
            DataTable dt = new DataTable();

            dt = ObjDl.InsertUserEntry(pl);
            //int i =Convert.ToInt16(dt.Rows[0][0].ToString());
            return(dt);
        }
Exemplo n.º 2
0
 public DataTable GetMenuList(PL_UserCreation pl)
 {
     cmd             = new SqlCommand("SPMenus", con);
     cmd.CommandType = CommandType.StoredProcedure;
     cmd.Parameters.AddWithValue("@Ind", pl.Ind);
     cmd.Parameters.AddWithValue("@UserTypeID", pl.UserTypeID);
     dt = new DataTable();
     da = new SqlDataAdapter(cmd);
     da.Fill(dt);
     return(dt);
 }
Exemplo n.º 3
0
 public DataTable GetUserloginIdUnique(PL_UserCreation pl)
 {
     cmd             = new SqlCommand("SPLoginDetails", con);
     cmd.CommandType = CommandType.StoredProcedure;
     cmd.Parameters.AddWithValue("@Ind", pl.Ind);
     cmd.Parameters.AddWithValue("@UserLoginID", pl.UserLoginId);
     dt = new DataTable();
     da = new SqlDataAdapter();
     da.Fill(dt);
     return(dt);
 }
Exemplo n.º 4
0
 public DataTable GetLockedUsers(PL_UserCreation pl)
 {
     try {
         cmd             = new SqlCommand("SPLoginDetails", con);
         cmd.CommandType = CommandType.StoredProcedure;
         cmd.Parameters.AddWithValue("@Ind", pl.Ind);
         cmd.Parameters.AddWithValue("@UserId", pl.UserId);
         da = new SqlDataAdapter(cmd);
         dt = new DataTable();
         da.Fill(dt);
     }
     catch (Exception ex) { msg = ex.Message; }
     return(dt);
 }
Exemplo n.º 5
0
        public DataSet GetAllUserInGrid(PL_UserCreation pl)
        {
            DataSet ds = new DataSet();

            try {
                cmd             = new SqlCommand("SPRegister", con);
                cmd.CommandType = CommandType.StoredProcedure;
                cmd.Parameters.AddWithValue("@Ind", pl.Ind);
                da = new SqlDataAdapter(cmd);
                //dt = new DataTable();
                //da.Fill(dt);

                da.Fill(ds);
            }
            catch (Exception ex) { msg = ex.Message; }
            return(ds);
        }
Exemplo n.º 6
0
        public DataTable GetAllRegister(PL_UserCreation pl)
        {
            try {
                cmd             = new SqlCommand("SPGetAllMaster", con);
                cmd.CommandType = CommandType.StoredProcedure;
                cmd.Parameters.AddWithValue("@Ind", pl.Ind);
                if (pl.Ind == 6)
                {
                    cmd.Parameters.AddWithValue("@ItmId", pl.ItemID);
                }

                da = new SqlDataAdapter(cmd);
                dt = new DataTable();
                da.Fill(dt);
            }
            catch (Exception ex) { msg = ex.Message; }
            return(dt);
        }
Exemplo n.º 7
0
        public int UpdateUnlockedUser(PL_UserCreation pl)
        {
            int i = 0;

            try
            {
                cmd             = new SqlCommand("SPLoginDetails", con);
                cmd.CommandType = CommandType.StoredProcedure;
                cmd.Parameters.AddWithValue("@Ind", pl.Ind);
                cmd.Parameters.AddWithValue("@LockInd", pl.LockId);
                cmd.Parameters.AddWithValue("@UserId", pl.UserId);
                con.Open();
                i = cmd.ExecuteNonQuery();
                con.Close();
            }
            catch (Exception ex) { msg = ex.Message; }
            return(i);
        }
Exemplo n.º 8
0
        public DataTable UpdateUserValidity(PL_UserCreation pl)
        {
            DataTable dt = new DataTable();

            cmd             = new SqlCommand("SPRegister", con);
            cmd.CommandType = CommandType.StoredProcedure;
            cmd.Parameters.AddWithValue("@Ind", pl.Ind);
            cmd.Parameters.AddWithValue("@UserValidity", pl.UserValidity);
            cmd.Parameters.AddWithValue("@UserID", pl.UserId);
            cmd.Parameters.AddWithValue("@MacAddress", pl.MacAddress);
            cmd.Parameters.AddWithValue("@EmployeeID", pl.EmployeeID);
            con.Open();
            // cmd.ExecuteNonQuery();
            SqlDataAdapter da = new SqlDataAdapter(cmd);

            da.Fill(dt);
            con.Close();
            return(dt);
        }
Exemplo n.º 9
0
        public DataTable InsertUserEntry(PL_UserCreation pl)
        {
            DataTable dt = new DataTable();

            //  int i=0;
            try
            {
                cmd             = new SqlCommand("SPLoginDetails", con);
                cmd.CommandType = CommandType.StoredProcedure;
                cmd.Parameters.AddWithValue("@Ind", pl.Ind);
                cmd.Parameters.AddWithValue("@UserTypeID", pl.UserType);
                cmd.Parameters.AddWithValue("@UserName", pl.UserName);
                cmd.Parameters.AddWithValue("@UserState", pl.State);
                cmd.Parameters.AddWithValue("@UserCity", pl.City);
                cmd.Parameters.AddWithValue("@UserAddress", pl.Address);
                cmd.Parameters.AddWithValue("@UserMobileNo", pl.ContactNo);
                cmd.Parameters.AddWithValue("@UserEmailAddr", pl.Email);
                cmd.Parameters.AddWithValue("@UserLoginID", pl.LoginId);
                cmd.Parameters.AddWithValue("@UserLoginPwd", pl.Pwd);
                cmd.Parameters.AddWithValue("@IsOutSideUser", pl.IsOutSideUser);
                cmd.Parameters.AddWithValue("@IsActive", pl.IsActive);
                cmd.Parameters.AddWithValue("@CreationDate", pl.CreationDate);
                cmd.Parameters.AddWithValue("@UserLoginStatus", pl.UserLoginStatus);
                cmd.Parameters.AddWithValue("@UserValidity", pl.UserValidity);
                cmd.Parameters.AddWithValue("@MacAddress", pl.MacAddress);
                cmd.Parameters.AddWithValue("@EmployeeID", pl.EmployeeID);
                con.Open();
                SqlDataAdapter ad = new SqlDataAdapter(cmd);
                ad.Fill(dt);

                // cmd.ExecuteNonQuery();
                con.Close();
            }
            catch (Exception ex) { msg = ex.Message; }
            return(dt);
        }