Exemple #1
0
 /// <summary>
 /// 更新一条TPlatform记录
 /// </summary>
 /// <param name="dto">TPlatform实体</param>
 /// <returns>是否更新成功</returns>
 public bool Update(TPlatformDTO dto)
 {
     try
     {
         if (_repository.Update(dto.ProjectedAs <T_Platform>()) >= 0)
         {
             return(true);
         }
         else
         {
             return(false);
         }
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
Exemple #2
0
        public FormAutoLogin(TPlatformDTO dto)
        {
            InitializeComponent();
            _platformDTO = dto;
            Text         = dto.PlatformName;
            string result = AutoLoginDataHelper.GetByKey(dto.PlatformUri);

            if (string.IsNullOrEmpty(result) || result.Split(';').Length < 3)
            {
                MessageBox.Show("登录字典不存在!");
                this.Close();
            }
            string[] strs = result.Split(';');
            _userKey  = strs[0];
            _pswKey   = strs[1];
            _loginKey = strs[2];
            browserer.Navigate(dto.PlatformUri);
        }
Exemple #3
0
 /// <summary>
 /// 新增一条TPlatform记录
 /// </summary>
 /// <param name="dto">TPlatform实体</param>
 /// <returns>是否新增成功</returns>
 public bool Add(TPlatformDTO dto)
 {
     try
     {
         var entity = dto.ProjectedAs <T_Platform>();
         if (_repository.Insert(entity) > 0)
         {
             return(true);
         }
         else
         {
             return(false);
         }
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }