Example #1
0
 public UserModel Login(string struser)
 {
     UserModel model;
     UserModel model2 = new UserDal();
     DB_OPT dbo = new DB_OPT();
     try
     {
         dbo.Open();
         model2.UserName = struser;
         model2.Login(dbo);
         ConfigurationModel model3 = new ConfigurationDal().GetModel(dbo);
         if (model3 != null)
         {
             HttpContext.Current.Response.Cookies["ischangelist"].Value = model3.ISCHANGELIST;
             HttpContext.Current.Session["common"] = model3;
             if (model3.ErrMessPath != "")
             {
                 ExceptionLog.ExceptionLog log = new ExceptionLog.ExceptionLog {
                     LogFilePath = model3.ErrMessPath
                 };
             }
         }
         model = model2;
     }
     catch (Exception exception)
     {
         throw exception;
     }
     finally
     {
         dbo.Close();
     }
     return model;
 }