public void updateMerit(int Client_id, DateTime Date, double Salary, double TotalMerit, double TotalDeduction, double Total) { DAL.DAL dal = new DAL.DAL(); dal.open(); SqlParameter[] param = new SqlParameter[4]; param[0] = new SqlParameter("@Client_id", SqlDbType.Int); param[0].Value = Client_id; param[1] = new SqlParameter("@Date", SqlDbType.Date); param[1].Value = Date; param[2] = new SqlParameter("@Salary", SqlDbType.Float); param[2].Value = Salary; param[3] = new SqlParameter("@TotalMerit", SqlDbType.Float); param[3].Value = TotalMerit; param[3] = new SqlParameter("@TotalDeduction", SqlDbType.Float); param[3].Value = TotalDeduction; param[3] = new SqlParameter("@Total", SqlDbType.Float); param[3].Value = Total; dal.ExecuteComand("updateMerit", param); dal.close(); }
/* public void addOverall(int Client_id, DateTime Date, double Salary, double TotalMerit, double TotalDeduction, double Total) * { * DAL.DAL dal = new DAL.DAL(); * dal.open(); * SqlParameter[] param = new SqlParameter[4]; * * param[0] = new SqlParameter("@Client_id", SqlDbType.Int); * param[0].Value = Client_id; * * param[1] = new SqlParameter("@Date", SqlDbType.Date); * param[1].Value = Date; * * param[2] = new SqlParameter("@Salary", SqlDbType.Float); * param[2].Value = Salary; * * param[3] = new SqlParameter("@TotalMerit", SqlDbType.Float); * param[3].Value = TotalMerit; * * * param[3] = new SqlParameter("@TotalDeduction", SqlDbType.Float); * param[3].Value = TotalDeduction; * * * * param[3] = new SqlParameter("@Total", SqlDbType.Float); * param[3].Value = Total; * * dal.ExecuteComand("addOverall", param); * dal.close(); * } * * */ public void addShift(int Client_id, DateTime Date, double MorningShift, double NightShift, double extra_shift, double over_shift, double no_of_staying_hours) { DAL.DAL dal = new DAL.DAL(); dal.open(); SqlParameter[] param = new SqlParameter[7]; param[0] = new SqlParameter("@Client_id", SqlDbType.Int); param[0].Value = Client_id; param[1] = new SqlParameter("@_Date", SqlDbType.Date); param[1].Value = Date; param[2] = new SqlParameter("@MorningShift", SqlDbType.Float); param[2].Value = MorningShift; param[3] = new SqlParameter("@NightShift", SqlDbType.Float); param[3].Value = NightShift; param[4] = new SqlParameter("@extra_shift", SqlDbType.Float); param[4].Value = extra_shift; param[5] = new SqlParameter("@over_shift", SqlDbType.Float); param[5].Value = over_shift; param[6] = new SqlParameter("@no_of_staying_hours", SqlDbType.Float); param[6].Value = no_of_staying_hours; dal.ExecuteComand("addShift", param); dal.close(); }
public void deleteAllClients() { DAL.DAL dal = new DAL.DAL(); dal.open(); dal.ExecuteComand("deleteAllClients", null); dal.close(); }
public void updateClinet(string Name, int id_department_and_role, double salary, string type_of_sallary, double value_of_stay, int Client_id) { DAL.DAL dal = new DAL.DAL(); dal.open(); SqlParameter[] param = new SqlParameter[6]; param[0] = new SqlParameter("@Name", SqlDbType.VarChar, 50); param[0].Value = Name; param[1] = new SqlParameter("@id_department_and_role", SqlDbType.Int); param[1].Value = id_department_and_role; param[2] = new SqlParameter("@salary", SqlDbType.Float); param[2].Value = salary; param[3] = new SqlParameter("@type_of_sallary", SqlDbType.VarChar, 50); param[3].Value = type_of_sallary; param[4] = new SqlParameter("@value_of_stay", SqlDbType.Float); param[4].Value = value_of_stay; param[5] = new SqlParameter("@Client_id", SqlDbType.Int); param[5].Value = Client_id; dal.ExecuteComand("updateClinet", param); dal.close(); }
public void update_consatant(double new_insurance, double old_insurance, double morning_shift, double night_shift, double Incentives, int id_department_and_role) { DAL.DAL dal = new DAL.DAL(); dal.open(); SqlParameter[] param = new SqlParameter[6]; param[0] = new SqlParameter("@id_department_and_role", SqlDbType.Int); param[0].Value = id_department_and_role; param[1] = new SqlParameter("@new_insurance", SqlDbType.Float); param[1].Value = new_insurance; param[2] = new SqlParameter("@old_insurance", SqlDbType.Float); param[2].Value = old_insurance; param[3] = new SqlParameter("@morning_shift", SqlDbType.Float); param[3].Value = morning_shift; param[4] = new SqlParameter("@night_shift", SqlDbType.Float); param[4].Value = night_shift; param[5] = new SqlParameter("@Incentives", SqlDbType.Float); param[5].Value = Incentives; dal.ExecuteComand("update_consatant", param); dal.close(); }
public void add_piad_sallary(int client_id, DateTime date, double total_sallary, string month, string year) { DAL.DAL dal = new DAL.DAL(); dal.open(); SqlParameter[] param = new SqlParameter[5]; param[0] = new SqlParameter("@client_id", SqlDbType.Int); param[0].Value = client_id; param[1] = new SqlParameter("@date", SqlDbType.Date); param[1].Value = date; param[2] = new SqlParameter("@total_sallary", SqlDbType.Float); param[2].Value = total_sallary; param[3] = new SqlParameter("@month", SqlDbType.VarChar, 50); param[3].Value = month; param[4] = new SqlParameter("@year", SqlDbType.VarChar, 50); param[4].Value = year; dal.ExecuteComand("add_piad_sallary", param); dal.close(); }
public void add_over_all_summary(int client_id, int number_of_attendence_days, int month, int year, double pure_salary) { DAL.DAL dal = new DAL.DAL(); dal.open(); SqlParameter[] param = new SqlParameter[5]; param[0] = new SqlParameter("@client_id", SqlDbType.Int); param[0].Value = client_id; param[1] = new SqlParameter("@number_of_attendence_days", SqlDbType.Int); param[1].Value = number_of_attendence_days; param[2] = new SqlParameter("@month", SqlDbType.Int); param[2].Value = month; param[3] = new SqlParameter("@year", SqlDbType.Int); param[3].Value = year; param[4] = new SqlParameter("@pure_salary", SqlDbType.Float); param[4].Value = pure_salary; dal.ExecuteComand("add_over_all_summary", param); dal.close(); }
public void addClient(string name, int Age, string Gander, string ClientAddress, string Department, string PhoneNumber, double Salary ) { DAL.DAL dal = new DAL.DAL(); dal.open(); SqlParameter[] param = new SqlParameter[7]; param[0] = new SqlParameter("@Name", SqlDbType.VarChar, 50); param[0].Value = name; param[1] = new SqlParameter("@Age", SqlDbType.TinyInt); param[1].Value = Age; param[2] = new SqlParameter("@Gander", SqlDbType.VarChar, 50); param[2].Value = Gander; param[3] = new SqlParameter("@ClientAddress", SqlDbType.VarChar, 50); param[3].Value = ClientAddress; param[4] = new SqlParameter("@Department", SqlDbType.VarChar, 50); param[4].Value = Department; param[5] = new SqlParameter("@PhoneNumber", SqlDbType.VarChar, 50); param[5].Value = PhoneNumber; param[6] = new SqlParameter("@Salary", SqlDbType.Float); param[6].Value = Salary; dal.ExecuteComand("addClient", param); dal.close(); }
public void add_salary_motion(int client_id, string month, string year, string day) { DAL.DAL dal = new DAL.DAL(); dal.open(); SqlParameter[] param = new SqlParameter[4]; param[0] = new SqlParameter("@client_id", SqlDbType.Int); param[0].Value = client_id; param[1] = new SqlParameter("@month", SqlDbType.VarChar, 50); param[1].Value = month; param[2] = new SqlParameter("@year", SqlDbType.VarChar, 50); param[2].Value = year; param[3] = new SqlParameter("@day", SqlDbType.VarChar, 50); param[3].Value = day; dal.ExecuteComand("add_salary_motion", param); dal.close(); }
public void add_staying_houres(int client_id, double number_of_staying_hours, string month, string year, string day) { DAL.DAL dal = new DAL.DAL(); dal.open(); SqlParameter[] param = new SqlParameter[5]; param[0] = new SqlParameter("@client_id", SqlDbType.Int); param[0].Value = client_id; param[1] = new SqlParameter("@number_of_staying_hours", SqlDbType.Float); param[1].Value = number_of_staying_hours; param[2] = new SqlParameter("@month", SqlDbType.VarChar, 50); param[2].Value = month; param[3] = new SqlParameter("@year", SqlDbType.VarChar, 50); param[3].Value = year; param[4] = new SqlParameter("@day", SqlDbType.VarChar, 50); param[4].Value = day; dal.ExecuteComand("add_staying_houres", param); dal.close(); }
public void update_total_staying_if_not_exist(int client_id, double total_number_of_staying_in_month, int days, int month, int year) { DAL.DAL dal = new DAL.DAL(); dal.open(); SqlParameter[] param = new SqlParameter[5]; param[0] = new SqlParameter("@client_id", SqlDbType.Int); param[0].Value = client_id; param[1] = new SqlParameter("@total_number_of_staying_in_month", SqlDbType.Float); param[1].Value = total_number_of_staying_in_month; param[2] = new SqlParameter("@days", SqlDbType.Int); param[2].Value = days; param[3] = new SqlParameter("@month", SqlDbType.Int); param[3].Value = month; param[4] = new SqlParameter("@year", SqlDbType.Int); param[4].Value = year; dal.ExecuteComand("update_total_staying_if_not_exist", param); dal.close(); }
public void updateDeduction(DateTime _Date, double Lateness, double Loan, double Insurance, double Tax, int Absence, int Client_id) { DAL.DAL dal = new DAL.DAL(); dal.open(); SqlParameter[] param = new SqlParameter[7]; param[0] = new SqlParameter("@_Date", SqlDbType.Date); param[0].Value = _Date; param[1] = new SqlParameter("@Lateness", SqlDbType.Float); param[1].Value = Lateness; param[2] = new SqlParameter("@Loan", SqlDbType.Float); param[2].Value = Loan; param[3] = new SqlParameter("@Insurance", SqlDbType.Float); param[3].Value = Insurance; param[4] = new SqlParameter("@Tax", SqlDbType.Float); param[4].Value = Tax; param[5] = new SqlParameter("@Absence", SqlDbType.Int); param[5].Value = Absence; param[6] = new SqlParameter("@Client_id", SqlDbType.Int); param[6].Value = Client_id; dal.ExecuteComand("updateDeduction", param); dal.close(); }
public void add_over_all_salary(int client_id, string client_name, double based_salary, double total_merit, double taxs, double insurance, double dely, double loan, double total_deduction, double other, string note_on_other, double pure_salary) { DAL.DAL dal = new DAL.DAL(); dal.open(); SqlParameter[] param = new SqlParameter[12]; param[0] = new SqlParameter("@client_id", SqlDbType.Int); param[0].Value = client_id; param[1] = new SqlParameter("@client_name", SqlDbType.VarChar, 50); param[1].Value = client_name; param[2] = new SqlParameter("@based_salary", SqlDbType.Float); param[2].Value = based_salary; param[3] = new SqlParameter("@total_merit", SqlDbType.Float); param[3].Value = total_merit; param[4] = new SqlParameter("@taxs", SqlDbType.Float); param[4].Value = taxs; param[5] = new SqlParameter("@insurance", SqlDbType.Float); param[5].Value = insurance; param[6] = new SqlParameter("@dely", SqlDbType.Float); param[6].Value = dely; param[7] = new SqlParameter("@loan", SqlDbType.Float); param[7].Value = loan; param[8] = new SqlParameter("@total_deduction", SqlDbType.Float); param[8].Value = total_deduction; param[9] = new SqlParameter("@other", SqlDbType.Float); param[9].Value = other; param[10] = new SqlParameter("@note_on_other", SqlDbType.VarChar, 50); param[10].Value = note_on_other; param[11] = new SqlParameter("@pure_salary", SqlDbType.Float); param[11].Value = pure_salary; dal.ExecuteComand("add_over_all_salary", param); dal.close(); }
public void delete_constant(int @id_department_and_role) { DAL.DAL dal = new DAL.DAL(); dal.open(); SqlParameter[] param = new SqlParameter[1]; param[0] = new SqlParameter("@id_department_and_role", SqlDbType.Int); param[0].Value = id_department_and_role; dal.ExecuteComand("delete_constant", param); dal.close(); }
public void deleteclinet(int Client_id) { DAL.DAL dal = new DAL.DAL(); dal.open(); SqlParameter[] param = new SqlParameter[1]; param[0] = new SqlParameter("@Client_id", SqlDbType.Int); param[0].Value = Client_id; dal.ExecuteComand("deleteclinet", param); dal.close(); }
public void deleteUser(string User_Name) { DAL.DAL dal = new DAL.DAL(); dal.open(); SqlParameter[] param = new SqlParameter[1]; param[0] = new SqlParameter("@User_Name", SqlDbType.VarChar, 50); param[0].Value = User_Name; dal.ExecuteComand("deleteUser", param); dal.close(); }
public void addtax(int Client_id, double Tax) { DAL.DAL dal = new DAL.DAL(); dal.open(); SqlParameter[] param = new SqlParameter[2]; param[0] = new SqlParameter("@Client_id", SqlDbType.Int); param[0].Value = Client_id; param[1] = new SqlParameter("@Tax", SqlDbType.Float); param[1].Value = Tax; dal.ExecuteComand("addtax", param); dal.close(); }
public void add_other(string additions, double value_of_additions, string fans, double value_of_fans, DateTime date_of_other, int Client_id, double other, string reaseon_of_other) { DAL.DAL dal = new DAL.DAL(); dal.open(); SqlParameter[] param = new SqlParameter[8]; param[0] = new SqlParameter("@additions", SqlDbType.VarChar, 50); param[0].Value = additions; param[1] = new SqlParameter("@value_of_additions", SqlDbType.Float); param[1].Value = value_of_additions; param[2] = new SqlParameter("@fans", SqlDbType.VarChar, 50); param[2].Value = fans; param[3] = new SqlParameter("@value_of_fans", SqlDbType.Float); param[3].Value = value_of_fans; param[4] = new SqlParameter("@date_of_other", SqlDbType.Date); param[4].Value = date_of_other; param[5] = new SqlParameter("@Client_id", SqlDbType.Int); param[5].Value = Client_id; param[6] = new SqlParameter("@other", SqlDbType.Float); param[6].Value = other; param[7] = new SqlParameter("@reaseon_of_other", SqlDbType.VarChar, 50); param[7].Value = reaseon_of_other; dal.ExecuteComand("add_other", param); dal.close(); }
/// الدوال التي تضيف/////////////////////////////////////////////////////////////////////////////////////////////////////////// public void add_client_motion(int client_id, int motion_id, DateTime motion_date, string month, string year, string day, int id_department_and_role, double number_of_dely_minute) { DAL.DAL dal = new DAL.DAL(); dal.open(); SqlParameter[] param = new SqlParameter[8]; param[0] = new SqlParameter("@client_id", SqlDbType.Int); param[0].Value = client_id; param[1] = new SqlParameter("@motion_id", SqlDbType.Int); param[1].Value = motion_id; param[2] = new SqlParameter("@motion_date", SqlDbType.DateTime); param[2].Value = motion_date; param[3] = new SqlParameter("@month", SqlDbType.VarChar, 50); param[3].Value = month; param[4] = new SqlParameter("@year", SqlDbType.VarChar, 50); param[4].Value = year; param[5] = new SqlParameter("@day", SqlDbType.VarChar, 50); param[5].Value = day; param[6] = new SqlParameter("@id_department_and_role", SqlDbType.Int); param[6].Value = id_department_and_role; param[7] = new SqlParameter("@number_of_dely_minute", SqlDbType.Float); param[7].Value = number_of_dely_minute; dal.ExecuteComand("add_client_motion", param); dal.close(); }
public void update_role_and_department(string role, string department, int @id_department_and_role) { DAL.DAL dal = new DAL.DAL(); dal.open(); SqlParameter[] param = new SqlParameter[3]; param[0] = new SqlParameter("@role", SqlDbType.VarChar, 50); param[0].Value = role; param[1] = new SqlParameter("@department", SqlDbType.VarChar, 50); param[1].Value = department; param[2] = new SqlParameter("@id_department_and_role", SqlDbType.Int); param[2].Value = @id_department_and_role; dal.ExecuteComand("update_role_and_department", param); dal.close(); }
public void add_vendor(string vendor_name, string ven_phone, string ven_address, double last_money, double ven_credit_limit, string ven_type, string notes, byte[] ven_image) { DAL.DAL dal = new DAL.DAL(); dal.open(); SqlParameter [] param = new SqlParameter [8]; param[0] = new SqlParameter("@ven_name", SqlDbType.VarChar, 50); param[0].Value = vendor_name; param[1] = new SqlParameter("@ven_phone", SqlDbType.VarChar, 50); param[1].Value = ven_phone; param[2] = new SqlParameter("@ven_address", SqlDbType.VarChar, 50); param[2].Value = ven_address; param[3] = new SqlParameter("@last_money", SqlDbType.Float); param[3].Value = last_money; param[4] = new SqlParameter("@ven_credit_limit", SqlDbType.Float); param[4].Value = ven_credit_limit; param[5] = new SqlParameter("@ven_type", SqlDbType.VarChar, 50); param[5].Value = ven_type; param[6] = new SqlParameter("@notes", SqlDbType.VarChar, 50); param[6].Value = notes; param[7] = new SqlParameter("@ven_image", SqlDbType.Image); param[7].Value = ven_image; dal.ExecuteComand("add_vendor", param); dal.close(); }
public void update_tax_for_month(DateTime curent_date, int client_id, double tax) { DAL.DAL dal = new DAL.DAL(); dal.open(); SqlParameter[] param = new SqlParameter[3]; param[2] = new SqlParameter("@curent_date", SqlDbType.Date); param[2].Value = curent_date; param[1] = new SqlParameter("@client_id", SqlDbType.Int); param[1].Value = client_id; param[0] = new SqlParameter("@tax", SqlDbType.Float); param[0].Value = tax; dal.ExecuteComand("update_tax_for_month", param); dal.close(); }
public void update_client_sallary_state(int Client_id, string month, string year, string client_sallary_state) { DAL.DAL dal = new DAL.DAL(); dal.open(); SqlParameter[] param = new SqlParameter[4]; param[0] = new SqlParameter("@Client_id", SqlDbType.Int); param[0].Value = Client_id; param[1] = new SqlParameter("@month", SqlDbType.VarChar, 50); param[1].Value = month; param[2] = new SqlParameter("@year", SqlDbType.VarChar, 50); param[2].Value = year; param[3] = new SqlParameter("@client_sallary_state", SqlDbType.VarChar, 50); param[3].Value = client_sallary_state; dal.ExecuteComand("update_client_sallary_state", param); dal.close(); }
public void addIncentives(int Client_id, double Incentives, int depart_role_id) { DAL.DAL dal = new DAL.DAL(); dal.open(); SqlParameter[] param = new SqlParameter[3]; param[0] = new SqlParameter("@Client_id", SqlDbType.Int); param[0].Value = Client_id; param[1] = new SqlParameter("@Incentives", SqlDbType.Float); param[1].Value = Incentives; param[2] = new SqlParameter("@depart_role_id", SqlDbType.Int); param[2].Value = depart_role_id; dal.ExecuteComand("addIncentives", param); dal.close(); }
public void add_role_and_department(int id_department_and_role, string role, string Department) { DAL.DAL dal = new DAL.DAL(); dal.open(); SqlParameter[] param = new SqlParameter[3]; param[0] = new SqlParameter("@id_department_and_role", SqlDbType.Int); param[0].Value = @id_department_and_role; param[1] = new SqlParameter("@role", SqlDbType.VarChar, 50); param[1].Value = role; param[2] = new SqlParameter("@Department", SqlDbType.VarChar, 50); param[2].Value = Department; dal.ExecuteComand("add_role_and_department", param); dal.close(); }
public void addUser(string User_full_name, string User_Name, string User_Password, string User_Accesability) { DAL.DAL dal = new DAL.DAL(); dal.open(); SqlParameter[] param = new SqlParameter[4]; param[0] = new SqlParameter("@User_full_name", SqlDbType.VarChar, 50); param[0].Value = User_full_name; param[1] = new SqlParameter("@User_Name", SqlDbType.VarChar, 50); param[1].Value = User_Name; param[2] = new SqlParameter("@User_Password", SqlDbType.VarChar, 50); param[2].Value = User_Password; param[3] = new SqlParameter("@User_Accesability", SqlDbType.VarChar, 50); param[3].Value = User_Accesability; dal.ExecuteComand("addUser", param); dal.close(); }
public void add_overall(int Client_id, string client_name, string department, DateTime _Date, double Total, double no_of_am_shifts, double value_of_am_shift, double no_of_pm_shifts, double value_of_pm_shift, double extra, double over, double Incentives, double TotalMerit, double latenss, double value_of_latenss, int absence, double value_of_absence, double tax, double insurance, double loan, int id_department_and_role, double TotalDeduction, string month, string year, string client_sallary_state) { DAL.DAL dal = new DAL.DAL(); dal.open(); SqlParameter[] param = new SqlParameter[25]; param[0] = new SqlParameter("@Client_id", SqlDbType.Int); param[0].Value = Client_id; param[1] = new SqlParameter("@client_name", SqlDbType.VarChar, 50); param[1].Value = client_name; param[2] = new SqlParameter("@department", SqlDbType.VarChar, 50); param[2].Value = department; param[3] = new SqlParameter("@_Date", SqlDbType.Date); param[3].Value = _Date; param[4] = new SqlParameter("@Total", SqlDbType.Float); param[4].Value = Total; param[5] = new SqlParameter("@no_of_am_shifts", SqlDbType.Float); param[5].Value = no_of_am_shifts; param[6] = new SqlParameter("@value_of_am_shift", SqlDbType.Float); param[6].Value = value_of_am_shift; param[7] = new SqlParameter("@no_of_pm_shifts", SqlDbType.Float); param[7].Value = no_of_pm_shifts; param[8] = new SqlParameter("@value_of_pm_shift", SqlDbType.Float); param[8].Value = value_of_pm_shift; param[9] = new SqlParameter("@extra", SqlDbType.Float); param[9].Value = extra; param[10] = new SqlParameter("@over", SqlDbType.Float); param[10].Value = over; param[11] = new SqlParameter("@Incentives", SqlDbType.Float); param[11].Value = Incentives; param[12] = new SqlParameter("@TotalMerit", SqlDbType.Float); param[12].Value = TotalMerit; param[13] = new SqlParameter("@latenss", SqlDbType.Float); param[13].Value = latenss; param[14] = new SqlParameter("@value_of_latenss", SqlDbType.Float); param[14].Value = value_of_latenss; param[15] = new SqlParameter("@absence", SqlDbType.Int); param[15].Value = absence; param[16] = new SqlParameter("@value_of_absence", SqlDbType.Float); param[16].Value = value_of_absence; param[17] = new SqlParameter("@tax", SqlDbType.Float); param[17].Value = tax; param[18] = new SqlParameter("@insurance", SqlDbType.Float); param[18].Value = insurance; param[19] = new SqlParameter("@loan", SqlDbType.Float); param[19].Value = loan; param[20] = new SqlParameter("@id_department_and_role", SqlDbType.Int); param[20].Value = id_department_and_role; param[21] = new SqlParameter("@TotalDeduction", SqlDbType.Float); param[21].Value = TotalDeduction; param[22] = new SqlParameter("@month", SqlDbType.VarChar, 50); param[22].Value = month; param[23] = new SqlParameter("@year", SqlDbType.VarChar, 50); param[23].Value = year; param[24] = new SqlParameter("@client_sallary_state", SqlDbType.VarChar, 50); param[24].Value = client_sallary_state; dal.ExecuteComand("add_overall", param); dal.close(); }