Пример #1
0
        public void LoadStdData()
        {
            try
            {
                VLecturersRepository vstdir = new VLecturersRepository();
                Session["lecdata"]   = vstdir.GetAllVLec();
                GridView1.DataSource = Session["lecdata"];


                GridView1.DataBind();

                lblrecordcount.Text = string.Format("{0} : {1}", vstdir.leccount().ToString().ToFarsiNumber(), Resources.DashboardText.RecordCount);

                lblSelectedDataCount.Text = string.Format("{0} : {1}", (Session["lecdata"] as DataTable).Rows.Count.ToString().ToFarsiNumber(), Resources.DashboardText.SelectRecordCount);
            }
            catch
            {
                Redirector.Goto(Redirector.PageName.errorpage);
            }
        }
Пример #2
0
        public DataTable GetLecturer(string username, string password)
        {
            WebServiceAccountsRepository webir       = new WebServiceAccountsRepository();
            WebServiceAccount            currentuser = webir.FindByUserName(username);

            if (currentuser != null)
            {
                if (currentuser.Password == password)
                {
                    VLecturersRepository depir = new VLecturersRepository();
                    return(depir.GetAllVLec());
                }
                else
                {
                    return(null);
                }
            }

            else
            {
                return(null);
            }
        }