Example #1
0
        public SqlCommand GetEmail(string Name)
        {
            sqlCon = myCon.getConnection();
            sqlCon.Open();
            string     query1 = "select Email_Id from Users where U_Id=@uid";
            SqlCommand cmd    = new SqlCommand(query1, sqlCon);

            cmd.Parameters.AddWithValue("@uid", Name);
            return(cmd);
        }
Example #2
0
        public DataSet check(string input)
        {
            sqlCon = myCon.getConnection();
            sqlCon.Open();
            String     query1 = "select l.Requested_Amount,u.Roles,l.L_Id ,l.Loan_Description ,l.RequestStatus  from Loan_Request l, Users u where u.u_Id=l.Assinged_To AND l.Email_Id =@Empid";
            SqlCommand cmd    = new SqlCommand(query1, sqlCon);

            cmd.Parameters.AddWithValue("@Empid", input);
            SqlDataAdapter sd = new SqlDataAdapter(cmd);
            DataSet        ds = new DataSet();

            sd.Fill(ds);
            return(ds);
        }