Example #1
0
        public void Posesh(int ID)
        {
            Pacient pac = db1.Pacient.Where(c => c.ID == ID).FirstOrDefault();

            pac.Posesh = pac.Posesh + 1;
            db1.SubmitChanges();
        }
Example #2
0
        public void Delete(string FIO)
        {
            Pacient pac = db1.Pacient.Where(c => c.FIO == FIO).FirstOrDefault();

            db1.Pacient.DeleteOnSubmit(pac);
            db1.SubmitChanges();
        }
Example #3
0
        public void Edit(int ID, string FIO, string Polis, string Pol, string Status)
        {
            Pacient pac = db1.Pacient.Where(c => c.ID == ID).FirstOrDefault();

            pac.FIO    = FIO;
            pac.Polis  = Polis;
            pac.Pol    = Pol;
            pac.Status = Status;
            db1.SubmitChanges();
        }
Example #4
0
        public void ADD(string FIO, string Polis, int Posesh, string Data, string Pol, string Status)
        {
            Pacient pac = new Pacient();

            pac.FIO    = FIO;
            pac.Polis  = Polis;
            pac.Posesh = Posesh;
            pac.Data   = Data;
            pac.Pol    = Pol;
            pac.Status = Status;
            db1.Pacient.InsertOnSubmit(pac);
            db1.SubmitChanges();
        }