Ejemplo n.º 1
0
 public Admin(tbl_AdminDetail a)
 {
     ID       = a.UserID;
     Salary   = a.Salary;
     HireDate = a.HireDate.Value;
     Shift    = a.Shift;
 }
Ejemplo n.º 2
0
        public void loadAdminDetails()
        {
            LibraryDBDataContext db = new LibraryDBDataContext();
            tbl_AdminDetail      a  = (from temp in db.tbl_AdminDetails
                                       where temp.UserID == this.ID
                                       select temp
                                       ).FirstOrDefault();

            this.Salary   = a.Salary;
            this.HireDate = a.HireDate.Value;
            this.Shift    = a.Shift;
        }
Ejemplo n.º 3
0
        public new void Add()
        {
            LibraryDBDataContext db = new LibraryDBDataContext();

            base.Add();
            tbl_AdminDetail a = new tbl_AdminDetail();

            a.UserID   = base.ID;
            a.Salary   = this.Salary;
            a.HireDate = this.HireDate;
            a.Shift    = this.Shift;

            db.tbl_AdminDetails.InsertOnSubmit(a);
            db.SubmitChanges();
        }