Exemple #1
0
        public void UpdateEmployee(int i, string name, string password, string bloodGroup, string gender)
        {
            Employee_Info employeeInfo = PharmacyContext.Employee_Infos.Single(x => x.Id == i);  //select *from medicine_info where medicine_id=i LIMIT 1

            employeeInfo.Employee_Name = name;
            employeeInfo.Password      = password;
            employeeInfo.Blood_Group   = bloodGroup;
            employeeInfo.Gender        = gender;
            PharmacyContext.SubmitChanges();
        }
Exemple #2
0
        public void DeleteEmployee(int i)
        {
            var m = from a in PharmacyContext.Employee_Infos
                    where a.Id == i
                    select a;
            Employee_Info obj = PharmacyContext.Employee_Infos.Single(x => x.Id == i);

            PharmacyContext.Employee_Infos.DeleteOnSubmit(obj);
            PharmacyContext.SubmitChanges();
        }
Exemple #3
0
        public void AddEmployee(string name, string password, string bloodGroup, string gender)
        {
            Employee_Info employeeInfo = new Employee_Info();

            employeeInfo.Employee_Name = name;
            employeeInfo.Password      = password;
            employeeInfo.Blood_Group   = bloodGroup;
            employeeInfo.Gender        = gender;


            PharmacyContext.Employee_Infos.InsertOnSubmit(employeeInfo);
            PharmacyContext.SubmitChanges();
        }
Exemple #4
0
 partial void DeleteEmployee_Info(Employee_Info instance);
Exemple #5
0
 partial void UpdateEmployee_Info(Employee_Info instance);
Exemple #6
0
 partial void InsertEmployee_Info(Employee_Info instance);