public cAccount getAccount(ds_account.spAccountReadRow dr) { cAccount ret = new cAccount(); ret.accId = dr.accId; ret.accFirstName = dr.accFirstName; ret.accLastName = dr.accLastName; ret.accUserName = dr.accUserName; ret.accAudDT = dr.acaDT; ret.accAutKey = dr.autKey; return(ret); }
public cAccount doLogout(string username) { cAccount ret = null; spAccountReadTableAdapter ta = new spAccountReadTableAdapter(); var dt = ta.doLogout(username); if (dt != null) { if (dt.Rows.Count > 0) { var dr = dt.FirstOrDefault(); ret = getAccount(dr); } } return(ret); }
public cAccount readById(Guid accId) { cAccount ret = null; spAccountReadByIdTableAdapter ta = new spAccountReadByIdTableAdapter(); sitedb.spAccountReadByIdDataTable dt = ta.GetData(accId); if (dt != null) { if (dt.Rows.Count > 0) { ret = new cAccount(dt); } } return(ret); }
public cAccount checkLoggedIn() { cAccount ret = null; mAccount acc = new mAccount(); mUCs p_mucs = mUCs.s_mUCs; Guid? mAccount = acc.accountLoggedIn(); if (mAccount == null) { p_mucs.HideAll(); p_mucs.m_ucLogin.Display(); } else { ret = new cAccount().readById((Guid)mAccount); } return(ret); }
public cAccount getAccount() { cAccount ret = null; spAccountReadTableAdapter ta = new spAccountReadTableAdapter(); var dt = ta.doRead(); if (dt != null) { if (dt.Rows.Count > 0) { var dr = dt.FirstOrDefault(); ret = getAccount(dr); } } return(ret); }