Exemplo n.º 1
0
        public static bool Insert(Basic_User_Signin_Info info)
        {
            Basic_User_Signin_DAL _Basic_User_Signin = new Basic_User_Signin_DAL();

            if (info.Id == Guid.Empty)
                return false;
            return _Basic_User_Signin.Insert(info);
        }
Exemplo n.º 2
0
        public static Basic_User_Signin ToDatabase(Basic_User_Signin_Info info)
        {
            Basic_User_Signin sigin = new Basic_User_Signin();

            sigin.Id            = info.Id;
            sigin.User          = info.User;
            sigin.IP            = info.IP;
            sigin.Time          = info.Time;
            sigin.Broswer       = info.Broswer;
            sigin.Major_Version = info.Major_Version;
            sigin.Position      = info.Position;

            return(sigin);
        }
Exemplo n.º 3
0
        public static Basic_User_Signin_Info ToModel(Basic_User_Signin sigin)
        {
            Basic_User_Signin_Info info = new Basic_User_Signin_Info();

            info.Id            = sigin.Id;
            info.User          = (Guid)sigin.User;
            info.IP            = sigin.IP;
            info.Time          = (DateTime)sigin.Time;
            info.Broswer       = sigin.Broswer;
            info.Major_Version = sigin.Major_Version;
            info.Position      = sigin.Position;

            return(info);
        }
Exemplo n.º 4
0
 public bool Insert(Basic_User_Signin_Info info)
 {
     using (MovieResShareEntities database = new MovieResShareEntities())
     {
         try
         {
             database.Basic_User_Signin.Add(ToDatabase(info));
             database.SaveChanges();
             return(true);
         }
         catch (Exception e)
         {
             return(false);
         }
     }
 }