コード例 #1
0
        static public int updatePatient(Patient p)
        {
            int sex = p.sex == "Nam" ? 1 : 0;
            int id  = Active.update("UPDATE patient SET name = N'" + p.full_name + "', sex = " + sex + ", yob = " + p.year_of_birth + ", address = N'" + p.address + "' where id = " + p.id);

            return(id);
        }
コード例 #2
0
        static public int updateMedicine(FullMedicine medicine, int user_change)
        {
            int id = Active.update("UPDATE medicine SET name = N'" + medicine.name + "', another_name = N'" + medicine.another_name + "', user_change = '" + user_change + "' where id = " + medicine.id + "");

            id = Active.update("UPDATE unit_price_medicine SET unit_id = '" + medicine.unit_id + "', unit_price = '" + medicine.unit_price + "', num_smallest_unit = '" + medicine.num_smallest_unit + "', user_change = '" + user_change + "' where medicine_id = " + medicine.id + "");
            return(id);
        }
コード例 #3
0
        static public int deleteMedicine(int medicine_id, int user_change)
        {
            int id = Active.update("UPDATE medicine SET is_delete = N'" + 1 + "', user_change = N'" + user_change + "' where id = " + medicine_id + "");

            id = Active.update("UPDATE unit_price_medicine SET is_delete = N'" + 1 + "', user_change = N'" + user_change + "' where medicine_id = " + medicine_id + "");
            return(id);
        }
コード例 #4
0
        static public int updateRegulation(ChangeRegulation updateFee, ChangeRegulation updatePatient, int user_update)
        {
            int id = Active.update("UPDATE change_reg SET modifled_day = '" + updateFee.modified.ToString("yyyy-MM-dd HH:mm:ss") + "', value_old = '" + updateFee.value_old + "', value_new = '" + updateFee.value_apply + "', user_change = '" + user_update + "', date_apply = '" + updateFee.date_apply.ToString("yyyy-MM-dd HH:mm:ss") + "' where id_function = " + updateFee.id_function + "");

            id = Active.update("UPDATE change_reg SET modifled_day = '" + updatePatient.modified.ToString("yyyy-MM-dd HH:mm:ss") + "', value_old = '" + updatePatient.value_old + "', value_new = '" + updatePatient.value_apply + "', user_change = '" + user_update + "', date_apply = '" + updatePatient.date_apply.ToString("yyyy-MM-dd HH:mm:ss") + "' where id_function = " + updatePatient.id_function + "");
            return(id);
        }
コード例 #5
0
        //update user (khong thay doi password)
        static public int updateUserNoPass(User u)
        {
            int id = Active.update("UPDATE user SET user = '******', name = N'" + u.full_name + "', email = '" + u.email + "', role_id = '" + u.role_id + "' where id = " + u.id + "");

            return(id);
        }
コード例 #6
0
        static public int deletePatient(int pid)
        {
            int id = Active.update("UPDATE patient SET is_delete = " + 1 + " where id = " + pid);

            return(id);
        }
コード例 #7
0
        static public int updateUseMedicine(UserMedicine use, int user_change)
        {
            int id = Active.update("UPDATE use_medicine SET name = N'" + use.name + "', detail = '" + use.detail + "', user_change = '" + user_change + "' where id = " + use.id + "");

            return(id);
        }
コード例 #8
0
        static public int updateUnitMedicine(UnitMedicine unit, int user_change)
        {
            int id = Active.update("UPDATE unit_medicine SET name = N'" + unit.name + "', user_change = '" + user_change + "' where id = " + unit.id + "");

            return(id);
        }
コード例 #9
0
        static public int updateMedicalExam(string code, long feeExam, int feeMedicine)
        {
            int num = Active.update("UPDATE medical_exam SET fee_exam = " + feeExam + ", fee_medicine = " + feeMedicine + " where code = '" + code + "'");

            return(num);
        }
コード例 #10
0
        static public int updateMedicalExam(string code, int sickID, string prognostic, int status)
        {
            int num = Active.update("UPDATE medical_exam SET sick_id = " + sickID + ", prognostic = N'" + prognostic + "', status = " + status + " where code = '" + code + "'");

            return(num);
        }
コード例 #11
0
        static public int updateMedicalExamStatus(string code, int status)
        {
            int num = Active.update("UPDATE medical_exam SET status = " + status + " WHERE code = '" + code + "'");

            return(num);
        }
コード例 #12
0
        static public int deleteSickness(int sick_id, int user_change)
        {
            int id = Active.update("UPDATE sickness SET is_delete = N'" + 1 + "', user_change = N'" + user_change + "' where id = " + sick_id + "");

            return(id);
        }
コード例 #13
0
        static public int updateSickness(Sickness sick, int user_change)
        {
            int id = Active.update("UPDATE sickness SET name = N'" + sick.name + "', noted = N'" + sick.noted + "', user_change = '" + user_change + "' where id = " + sick.id + "");

            return(id);
        }
コード例 #14
0
        static public int deleteUser(int userid, int is_delete)
        {
            int id = Active.update("UPDATE user SET is_delete = '" + is_delete + "' where id = '" + userid + "'");

            return(id);
        }