private void DAB_Click(object sender, EventArgs e) { if (account.Length > 0) { LoginTableAdapter LTA = new LoginTableAdapter(); LTA.DeleteByDesc(account); } UCL.ReturnUC(UCAL.UCID); FL.UCAL.Instance.DrawAccs(); }
private void DAB_Click(object sender, EventArgs e) { if (account.Length > 0) { LoginTableAdapter LTA = new LoginTableAdapter(); LTA.DeleteByDesc(account); } ((PwBot)Owner).DrawAccs(); this.Close(); }
public static Dictionary <int, String> GetAccs() { Dictionary <int, String> O = new Dictionary <int, String>(); LoginTableAdapter LTA = new LoginTableAdapter(); foreach (LoginRow r in LTA.GetData()) { O.Add(r.id, r.description); } return(O); }
private void AddButton_Click(object sender, EventArgs e) { try { LoginTableAdapter LTA = new LoginTableAdapter(); String LGN_R = LGN.Text.Length == 0 ? LGN_DEF : LGN.Text; String PSW_R = PSW.Text.Length == 0 ? PSW_DEF : PSW.Text; String DES_R = DES.Text.Length == 0 ? DES_DEF : DES.Text; int PNU_R = PNU.Text.Length == 0 ? 1 : Int32.Parse(PNU.Text); LTA.AddLogin(LGN_R, PSW_R, DES_R, PNU_R); } catch { } ((PwBot)Owner).DrawAccs(); this.Close(); }
public AutoLogin(int DB_ID) { this.DbId = DB_ID; LTA = new LoginTableAdapter(); foreach (LoginRow r in LTA.GetById(DB_ID)) { this.Login = r.login; this.Password = r.password; this.refresh_token = r.refresh_token; this.ACC_DESC = r.description; this.character_number = r.pers_num; this.expire = r.expire.Length > 0 ? DateTime.Parse(r.expire) : DateTime.Now.AddSeconds(-60); } AuthResult = Auth(); UpdatePath(); }
private void AddButton_Click(object sender, EventArgs e) { if (LGN.Text.Length == 0 || PSW.Text.Length == 0 || DES.Text.Length == 0) { return; } try { LoginTableAdapter LTA = new LoginTableAdapter(); int PNU_R = PNU.Text.Length == 0 ? 1 : Int32.Parse(PNU.Text); LTA.UpdateLogin(LGN.Text, PSW.Text, DES.Text, PNU_R, ICON, ID); } catch { } UCL.ReturnUC(UCAL.UCID); FL.UCAL.Instance.DrawAccs(); }
private void AddButton_Click(object sender, EventArgs e) { if (LGN.Text.Length == 0 || PSW.Text.Length == 0 || DES.Text.Length == 0) { return; } try { LoginTableAdapter LTA = new LoginTableAdapter(); int PNU_R = PNU.Text.Length == 0 ? 1 : Int32.Parse(PNU.Text); LTA.UpdateLogin(LGN.Text, PSW.Text, DES.Text, PNU_R, ICON, ID); } catch { } ((PwBot)Owner).DrawAccs(); this.Close(); }
public static List <GameAccount> GetAccs() { List <GameAccount> O = new List <GameAccount>(); LoginTableAdapter LTA = new LoginTableAdapter(); foreach (LoginRow r in LTA.GetData()) { GameAccount a = new GameAccount(); a.id = r.id; a.icon = r.icon; a.name = r.description; a.Login = r.login; a.Password = r.password; a.PERS_ID = r.pers_num; O.Add(a); } O.Sort(delegate(GameAccount x, GameAccount y) { return(x.name.CompareTo(y.name)); }); return(O); }
private void AddButton_Click(object sender, EventArgs e) { try { LoginTableAdapter LTA = new LoginTableAdapter(); String LGN_R = LGN.Text.Length == 0 ? LGN_DEF : LGN.Text; String PSW_R = PSW.Text.Length == 0 ? PSW_DEF : PSW.Text; String DES_R = DES.Text.Length == 0 ? DES_DEF : DES.Text; int PNU_R = PNU.Text.Length == 0 ? 1 : Int32.Parse(PNU.Text); foreach (GameAccount acc in AutoLogin.GetAccs()) { if (acc.name.Equals(DES_R)) { return; } } LTA.AddLogin(LGN_R, PSW_R, DES_R, PNU_R, ICON); } catch { } ((PwBot)Owner).DrawAccs(); this.Close(); }
public bool getLogin(string username, string password) { objLogin = new LoginTableAdapter(); return(Convert.ToBoolean(objLogin.GetLogin(username, password))); }
public int CheckLoginData(LoginDetail data) { int res = -1; Object obj; try { LoginTableAdapter loginAdapter = new LoginTableAdapter(); obj = loginAdapter.CheckLoginData(data.email, data.password); if (obj != null) { res = Convert.ToInt32(obj); } } catch (Exception ex) { EventLog.WriteEntry("Yaniv program", ex.Message, EventLogEntryType.SuccessAudit, 1); } return res; }
public int ActivateUserLoginByLoginID(int loginID, int userID) { LoginTableAdapter loginAdapter = new LoginTableAdapter(); return loginAdapter.ActivateUserLoginByLoginID(loginID, userID); }