示例#1
0
 public Customers validateUser(string Email, string Password)
 {
     TList<Customers> objcust = new TList<Customers>();
     Email.Trim();
     Password.Trim();
     //string whereclaus = CustomersColumn.EmailId + " LIKE '" + SearchPanel1.Username + "%'  and Usertype=7";
     //string whereclaus = CustomersColumn.EmailId + " LIKE '" + username + "%' and "+CustomersColumn.Password+ "='" + Password + "' and " +CustomersColumn.IsActive +"=1";
     string whereclaus = CustomersColumn.EmailId + " ='" + Email + "' and " + CustomersColumn.Password + "='" + Password + "' and " + CustomersColumn.IsActive + "=1";
     int Total = 0;
     string orderby = string.Empty;
     objcust = DataRepository.CustomersProvider.GetPaged(whereclaus, orderby, 0, int.MaxValue, out Total);
     //DataRepository.CustomersProvider.DeepLoad(objcust, true);
     if ((objcust != null) && (objcust.Count > 0))
     {
         return objcust.First();
     }
     return null;
 }
示例#2
0
文件: Monad.cs 项目: kogoia/Types
        public static M1 Bind <M0, M1, T1, T2>(this TList <T1> .ParentType <M0> monad, Func <T1, IMonad <M1, EmptyList, T2> > m)
            where M0 : IMonad <M0, EmptyList, T1>
            where M1 : TList <T2> .ParentType <M1>, IMonad <M1, EmptyList, T2>
            where T1 : class
            where T2 : class
        {
            var obj = m(monad.First());

            return(new Factory <M1, IEnumerable <T2> >(
                       obj,
                       monad
                       .SelectMany(
                           x => new Factory <M1, IEnumerable <T2> >(
                               obj,
                               ((M1)m(x)).Select(y => y)
                               ).Instance()
                           )
                       .Select(x => x)
                       )
                   .Instance());
        }