public void LoadStdData() { try { VEmployeesRepository vstdir = new VEmployeesRepository(); Session["stddata"] = vstdir.GetAllvEmp(); GridView1.DataSource = Session["stddata"]; GridView1.DataBind(); lblrecordcount.Text = string.Format("{0} : {1}", vstdir.Empcount().ToString().ToFarsiNumber(), Resources.DashboardText.RecordCount); lblSelectedDataCount.Text = string.Format("{0} : {1}", (Session["stddata"] as DataTable).Rows.Count.ToString().ToFarsiNumber(), Resources.DashboardText.SelectRecordCount); } catch { Redirector.Goto(Redirector.PageName.errorpage); } }
public DataTable GetEmployee(string username, string password) { WebServiceAccountsRepository webir = new WebServiceAccountsRepository(); WebServiceAccount currentuser = webir.FindByUserName(username); if (currentuser != null) { if (currentuser.Password == password) { VEmployeesRepository depir = new VEmployeesRepository(); return(depir.GetAllvEmp()); } else { return(null); } } else { return(null); } }