コード例 #1
0
ファイル: AddDoctor.cs プロジェクト: usamabin/SDAProject
 public AddDoctor()
 {
     InitializeComponent();
     doc = new CDoctor();
     add = new MAddDoctor();
     av  = new MAvalibleDays();
 }
コード例 #2
0
ファイル: CDoctor.cs プロジェクト: usamabin/SDAProject
        public void UpdateDoctor(MAddDoctor Obj)
        {
            string query = "update Doctor set ID=" + Obj.id + ",Name='" + Obj.name + "',FatherName='" + Obj.fathername + "',Username='******',UserPass='******',PhoneNumber='" + Obj.PhoneNumber + "',Cnic='" + Obj.Cnic + "',Address='" + Obj.Address + "',Salary='" + Obj.salary + "',DOB='" + Obj.dateofbirth + "',Speciality='" + Obj.speciality + "'where ID=" + Obj.id + "";

            if (db.DataManipulationOperation(query))
            {
                MessageBox.Show("Data Updated successfully");
            }
        }
コード例 #3
0
ファイル: CDoctor.cs プロジェクト: usamabin/SDAProject
        public void AddDoctor(MAddDoctor Obj)
        {
            string query = "insert into Doctor values(" + Obj.id + ",'" + Obj.name + "','" + Obj.fathername + "','" + Obj.username + "','" + Obj.password + "','" + Obj.salary + "','" + Obj.speciality + "','" + Obj.PhoneNumber + "','" + Obj.Cnic + "','" + Obj.Address + "','" + Obj.dateofbirth + "')";

            if (db.DataManipulationOperation(query))
            {
                MessageBox.Show("Data inserted successfully");
            }
        }