public void LoadTelContactData() { TelContactsRepository dir = new TelContactsRepository(); Session["TelContactData"] = dir.GetAllTelContacts(); GridView1.DataSource = Session["TelContactData"]; GridView1.DataBind(); lblrecordcount.Text = string.Format("{0} : {1}", dir.TelContactCount().ToString().ToFarsiNumber(), Resources.DashboardText.RecordCount); lblSelectedDataCount.Text = string.Format("{0} : {1}", (Session["TelContactData"] as DataTable).Rows.Count.ToString().ToFarsiNumber(), Resources.DashboardText.SelectRecordCount); }
public DataTable GetTelContact(string username, string password) { WebServiceAccountsRepository webir = new WebServiceAccountsRepository(); WebServiceAccount currentuser = webir.FindByUserName(username); if (currentuser != null) { if (currentuser.Password == password) { TelContactsRepository depir = new TelContactsRepository(); return(depir.GetAllTelContacts()); } else { return(null); } } else { return(null); } }