public StudentManager(SchoolDBEntities ctx) : base(ctx) { }
public SchoolDBEntities GetContext() { SchoolDBEntities wt = new SchoolDBEntities(); return(wt); }
public ParentManager(SchoolDBEntities ctx) : base(ctx) { }
public RolesManager(SchoolDBEntities ctx) : base(ctx) { }
static DatabaseAccessor() { Instance = new SchoolDBEntities(); Instance.Database.Connection.Open(); }
public Karmand FindByUserName(string id) { SchoolDBEntities db = new SchoolDBEntities(); return(db.Karmands.Where(p => p.UserName == id).Single()); }
public Lesson FindByLessonID(int id) { SchoolDBEntities db = new SchoolDBEntities(); return(db.Lessons.Where(p => p.LessonID == id).Single()); }
public vLessonGroup FindByYear(string year) { SchoolDBEntities db = new SchoolDBEntities(); return(db.vLessonGroups.Where(p => p.Year == year).Single()); }
public LessonGroup FindFromLgByLGID(int id) { SchoolDBEntities db = new SchoolDBEntities(); return(db.LessonGroups.Where(p => p.LGID == id).Single()); }
public void CheckHomework(string content) { using (SchoolDBEntities schoolDB = new SchoolDBEntities()) { } }
public AbsenceManager(SchoolDBEntities ctx) : base(ctx) { }
public vJavabeTamrinRepository() { conn = new Connection(); sd = conn.GetContext(); }
protected void gvEmployees_RowCommand(object sender, GridViewCommandEventArgs e) { if (e.CommandName == "Edit") { // Retrieve the row index stored in the // CommandArgument property. int index = Convert.ToInt32(e.CommandArgument); // Retrieve the row that contains the button // from the Rows collection. GridViewRow row = gvEmployees.Rows[index]; Session.Add("useridForEditEmployee", row.Cells[0].Text); Session.Timeout = 60; Response.Redirect("http://*****:*****@"<script type='text/javascript'>"); sb.Append("$('#modalShowDetails').modal('show');"); sb.Append(@"</script>"); ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "ModalScript", sb.ToString(), false); } } if (e.CommandName == "Delet") { // Retrieve the row index stored in the // CommandArgument property. int index = Convert.ToInt32(e.CommandArgument); // Retrieve the row that contains the button // from the Rows collection. GridViewRow row = gvEmployees.Rows[index]; // KarmandRepository rep = new KarmandRepository(); //rep.DeleteEmployee(row.Cells[0].Text); SchoolDBEntities db = new SchoolDBEntities(); Karmand k = new Karmand(); string a = row.Cells[0].Text; k = db.Karmands.Where(p => p.PersonalCode == a).Single(); db.Karmands.Remove(k); db.SaveChanges(); LoadEmployees(); } }
public Repository(SchoolDBEntities ctx) { _ctx = ctx; _set = _ctx.Set <TEntity>(); }
public vbarnameHaftegi FindByOzviatTak(int id) { SchoolDBEntities db = new SchoolDBEntities(); return(db.vbarnameHaftegis.Where(p => p.OzviatID == id).Single()); }
public BookManager(SchoolDBEntities ctx) : base(ctx) { }
public Karmand FindByEmployeeID(string id) { SchoolDBEntities db = new SchoolDBEntities(); return(db.Karmands.Where(p => p.PersonalCode == id).Single()); }
public LevelManager(SchoolDBEntities ctx) : base(ctx) { }
public NewsManager(SchoolDBEntities ctx) : base(ctx) { }
public CourseManager(SchoolDBEntities ctx) : base(ctx) { }
public GradesRepository() { conn = new Connection(); db = new SchoolDBEntities(); }
public StuffManger(SchoolDBEntities ctx) : base(ctx) { }
public Student FindByStudentCode(string id) { SchoolDBEntities db = new SchoolDBEntities(); return(db.Students.Where(p => p.StudentCode == id).Single()); }
public StdCrsManager(SchoolDBEntities ctx) : base(ctx) { }
public Repository() { context = new SchoolDBEntities(); }
protected void gvStudents_RowCommand(object sender, GridViewCommandEventArgs e) { if (e.CommandName == "Edit") { // Retrieve the row index stored in the // CommandArgument property. int index = Convert.ToInt32(e.CommandArgument); // Retrieve the row that contains the button // from the Rows collection. GridViewRow row = gvStudents.Rows[index]; Response.Redirect("http://*****:*****@"<script type='text/javascript'>"); sb.Append("$('#modalShowDetails').modal('show');"); sb.Append(@"</script>"); ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "ModalScript", sb.ToString(), false); } } if (e.CommandName == "Delet") { // Retrieve the row index stored in the // CommandArgument property. int index = Convert.ToInt32(e.CommandArgument); // Retrieve the row that contains the button // from the Rows collection. GridViewRow row = gvStudents.Rows[index]; vStudentRepository rep = new vStudentRepository(); SchoolDBEntities db = new SchoolDBEntities(); db.Students.Remove(rep.FindByStudentCode(row.Cells[0].Text)); } }