private void pic_update_Click(object sender, EventArgs e) { groupBox_WorkingEmp.Hide(); label_function_name.Text = "Update Project"; panel_proj_info_modify.Show(); enabletextboxes(); update_Btn.Show(); add_Btn.Hide(); edit_Button.Hide(); PictureBox pic = (PictureBox)sender; UC_Modify mod = (UC_Modify)pic.Parent; dt = cls_project.ProjectSearchByID(mod.value.ToString()); txt_id_proj.Text = dt.Rows[0][col1++].ToString(); txt_startdate_proj.Text = dt.Rows[0][col1++].ToString(); txt_name_proj.Text = dt.Rows[0][col1++].ToString(); txt_description_proj.Text = dt.Rows[0][col1++].ToString(); txt_consultant_proj.Text = dt.Rows[0][col1++].ToString(); txt_amount_proj.Text = dt.Rows[0][col1++].ToString(); txt_completedate_proj.Text = dt.Rows[0][col1++].ToString(); txt_delieverydate_proj.Text = dt.Rows[0][col1++].ToString(); txt_dateproject.Text = dt.Rows[0][col1++].ToString(); col1 = 0; txt_id_proj.ReadOnly = true; }
private void pic_update_Click(object sender, EventArgs e) { groupBox_Active_Projects.Hide(); groupBox_Completed_Projects.Hide(); groupBox_Employee_Skills.Hide(); label_function_name.Text = "Update Employee"; panel_emp_info_modify.Show(); enable_textboxes(); update_Btn.Show(); add_Btn.Hide(); btn_edit.Hide(); PictureBox pic = (PictureBox)sender; UC_Modify mod = (UC_Modify)pic.Parent; dt = cls_employee.SearchEmpById(mod.value.ToString()); txt_emp_name.Text = dt.Rows[0][0].ToString(); txt_emp_father_name.Text = dt.Rows[0][1].ToString(); txt_emp_cnic.Text = dt.Rows[0][2].ToString(); txt_emp_dob.Text = dt.Rows[0][3].ToString(); txt_emp_address.Text = dt.Rows[0][4].ToString(); txt_emp_agreement.Text = dt.Rows[0][5].ToString(); txt_emp_type.Text = dt.Rows[0][6].ToString(); txt_emp_gender.Text = dt.Rows[0][7].ToString(); txt_emp_designation.Text = dt.Rows[0][8].ToString(); txt_emp_qualification.Text = dt.Rows[0][9].ToString(); txt_emp_phone1.Text = dt.Rows[0][10].ToString(); txt_emp_phone2.Text = dt.Rows[0][11].ToString(); txt_employee_id.Text = dt.Rows[0][12].ToString(); txt_emp_salary.Text = dt.Rows[0][13].ToString(); txt_employee_id.ReadOnly = true; }
private void pic_update_Click(object sender, EventArgs e) { groupBox_Active_Projects.Hide(); groupBox_Completed_Projects.Hide(); groupBox_income.Hide(); label_function_name.Text = "Update Consultant"; add_Btn.Hide(); panel_consl_info_modify.Show(); update_Btn.Show(); enabletextboxes(); edit_BTn.Hide(); PictureBox pic = (PictureBox)sender; UC_Modify mod = (UC_Modify)pic.Parent; dt = cls_consultant.ConsultantAllDetailsByCons_ID(mod.value.ToString()); txt_cons_id.Text = dt.Rows[0][0].ToString(); txt_cons_name.Text = dt.Rows[0][1].ToString(); txt_cons_father.Text = dt.Rows[0][2].ToString(); txt_cons_dob.Text = Convert.ToDateTime(dt.Rows[0][3].ToString()).ToShortDateString(); txt_cons_gender.Text = dt.Rows[0][4].ToString(); txt_cons_address.Text = dt.Rows[0][5].ToString(); txt_cons_phone1.Text = dt.Rows[0][6].ToString(); txt_cons_phone2.Text = dt.Rows[0][7].ToString(); txt_cons_id.ReadOnly = true; }
private void pic_update_attendance_Click(object sender, EventArgs e) { modify_attendance = new Add_Update_Attendance_Form(this); modify_attendance.btn_update_attendance.BringToFront(); PictureBox pic = (PictureBox)sender; UC_Modify mod = (UC_Modify)pic.Parent; dt = cls_attendance.datashowfromattendancebyattid(Convert.ToInt32(mod.value)); modify_attendance.txt_attendance_id.Text = dt.Rows[0][0].ToString(); modify_attendance.txt_attendance_empid.Text = dt.Rows[0][1].ToString(); modify_attendance.txt_attendance_empname.Text = dt.Rows[0][2].ToString(); modify_attendance.txt_attendance_date.Text = Convert.ToDateTime(dt.Rows[0][3].ToString()).ToString("dd/MMM/yyyy"); modify_attendance.txt_attendance_intime.Text = dt.Rows[0][4].ToString(); modify_attendance.txt_attendance_outtime.Text = dt.Rows[0][5].ToString(); modify_attendance.txt_attendance_status.Text = dt.Rows[0][6].ToString(); modify_attendance.txt_attendance_id.ReadOnly = true; modify_attendance.txt_attendance_empid.ReadOnly = true; modify_attendance.txt_attendance_empname.ReadOnly = true; modify_attendance.txt_attendance_date.Enabled = false; modify_attendance.Show(); }
public void get_project_UC() { panel_add_student.Hide(); panel_project_data.Controls.Clear(); panel_project_data.Show(); panel_Project_Income.BringToFront(); int j = 0; var Top = 10; var Left = 200; for (int i = 0; i < count; i++) { pro_income_UC = new UC_Project_Income_Data(); pro_income_UC.Width = 710; pro_income_UC.Height = 25; pro_income_UC.label_projectincome_id.Text = dt.Rows[i][j++].ToString(); pro_income_UC.label_project_name.Text = dt.Rows[i][j++].ToString(); pro_income_UC.label_project_id.Text = dt.Rows[i][j++].ToString(); pro_income_UC.label_project_amount.Text = dt.Rows[i][j++].ToString(); pro_income_UC.label_project_date.Text = (Convert.ToDateTime(dt.Rows[i][j++].ToString()).ToString("dd/MMM/yyyy")); pro_income_UC.Left = 0; pro_income_UC.Top = Top; panel_project_data.Controls.Add(pro_income_UC); modify_UC = new UC_Modify(); modify_UC.Width = 30; modify_UC.Height = 30; modify_UC.Top = Top; modify_UC.Left = Left + 515; modify_UC.value = dt.Rows[i][0].ToString(); panel_project_data.Controls.Add(modify_UC); txt_rich = new RichTextBox(); txt_rich.Top = Top; txt_rich.Height = 30; txt_rich.Width = 200; txt_rich.Left = Left + 570; txt_rich.Text = dt.Rows[i][j++].ToString(); txt_rich.Enabled = false; panel_project_data.Controls.Add(txt_rich); Top += 60; j = 0; modify_UC.pic_update.Click += new EventHandler(pic_update_projectincome_Click); } }
private void pic_delete_regularexpense_Click(object sender, EventArgs e) { PictureBox pic = (PictureBox)sender; UC_Modify mod = (UC_Modify)pic.Parent; cls_expense.ProcDeleteRegularExpense(mod.value.ToString()); Refresh(); }
private void pic_delete_withdrawal_Click(object sender, EventArgs e) { PictureBox pic = (PictureBox)sender; UC_Modify mod = (UC_Modify)pic.Parent; cls_withdrawal.ProcDeleteWithdrawal(mod.value.ToString()); Refresh(); }
private void pic_delete_employeesalary_Click(object sender, EventArgs e) { PictureBox pic = (PictureBox)sender; UC_Modify mod = (UC_Modify)pic.Parent; cls_employee.ProcDeleteEmployeeSalaries(mod.value.ToString()); Refresh(); }
public void get_salaryexp_UC() { panel_salaryexp_data.Controls.Clear(); panel_salaryexp_data.Show(); panel_Salary_Expenses.BringToFront(); int j = 0; var Top = 10; var Left = 200; for (int i = 0; i < count; i++) { salary_exp_UC = new UC_Salary_Expense_Data(); salary_exp_UC.Width = 550; salary_exp_UC.Height = 25; salary_exp_UC.label_salaryexpense_id.Text = dt.Rows[i][j++].ToString(); salary_exp_UC.label_salary_emp_name.Text = dt.Rows[i][j++].ToString(); salary_exp_UC.label_salary_amount.Text = dt.Rows[i][j++].ToString(); salary_exp_UC.label_salary_date.Text = (Convert.ToDateTime(dt.Rows[i][j++].ToString()).ToString("dd/MMM/yyyy")); salary_exp_UC.Left = 0; salary_exp_UC.Top = Top; panel_salaryexp_data.Controls.Add(salary_exp_UC); modify_UC = new UC_Modify(); modify_UC.Width = 60; modify_UC.Height = 30; modify_UC.Top = Top; modify_UC.Left = Left + 360; modify_UC.value = dt.Rows[i][0].ToString(); panel_salaryexp_data.Controls.Add(modify_UC); txt_rich = new RichTextBox(); txt_rich.Top = Top; txt_rich.Height = 30; txt_rich.Width = 200; txt_rich.Left = Left + 430; txt_rich.Text = dt.Rows[i][j++].ToString(); txt_rich.Enabled = false; panel_salaryexp_data.Controls.Add(txt_rich); Top += 60; j = 0; modify_UC.pic_update.Click += new EventHandler(pic_update_employeesalary_Click); modify_UC.pic_delete.Click += new EventHandler(pic_delete_employeesalary_Click); } }
private void pic_delete_login_acoount_Click(object sender, EventArgs e) { PictureBox pic = (PictureBox)sender; UC_Modify mod = (UC_Modify)pic.Parent; cls_login.deletelogininfotabless(mod.value.ToString()); Refresh(); }
private void pic_delete_Click(object sender, EventArgs e) { PictureBox pic = (PictureBox)sender; UC_Modify mod = (UC_Modify)pic.Parent; cls_consultant.DeleteFromConsultantTable(mod.value.ToString()); Refresh(); }
private void pic_delete_Click(object sender, EventArgs e) { PictureBox pic = (PictureBox)sender; UC_Modify mod = (UC_Modify)pic.Parent; MessageBox.Show(cls_employee.DeleteEmployeeById(mod.value.ToString())); Refresh(); }
public void get_UC() { panel_data.Controls.Clear(); panel_data.Show(); label_amount_available.Text = cls_withdrawal.ProcAvailableAmountOfCompany().ToString(); label_total_withdrawal.Text = cls_withdrawal.ProcTotalWithdrawalOfCompany().ToString(); int j = 1; var Top = 10; var Left = 200; for (int i = 0; i < count; i++) { Withdrawal_UC = new UC_Withdrawal_Data(); Withdrawal_UC.Width = 400; Withdrawal_UC.Height = 25; Withdrawal_UC.label_withdrawal_name.Text = dt.Rows[i][j++].ToString(); Withdrawal_UC.label_withdrawal_amount.Text = dt.Rows[i][j++].ToString(); Withdrawal_UC.label_withdrawal_date.Text = (Convert.ToDateTime(dt.Rows[i][j++].ToString()).ToString("dd/MMM/yyyy")); Withdrawal_UC.Left = 0; Withdrawal_UC.Top = Top; panel_data.Controls.Add(Withdrawal_UC); modify_UC = new UC_Modify(); modify_UC.Width = 60; modify_UC.Height = 30; modify_UC.value = dt.Rows[i][0].ToString(); modify_UC.Top = Top; modify_UC.Left = Left + 210; panel_data.Controls.Add(modify_UC); txt_rich = new RichTextBox(); txt_rich.Top = Top; txt_rich.Height = 30; txt_rich.Width = 200; txt_rich.Left = Left + 300; txt_rich.Text = dt.Rows[i][j++].ToString(); txt_rich.Enabled = false; panel_data.Controls.Add(txt_rich); j = 1; Top += 60; modify_UC.pic_update.Click += new EventHandler(pic_update_withdrawal_Click); modify_UC.pic_delete.Click += new EventHandler(pic_delete_withdrawal_Click); } }
private void pic_delete_Click(object sender, EventArgs e) { add_Btn.Hide(); PictureBox pic = (PictureBox)sender; UC_Modify mod = (UC_Modify)pic.Parent; cls_project.DeleteProjectByID(Convert.ToInt32(mod.value)); Refresh(); }
private void Employee_Form_Load(object sender, EventArgs e) { panel_data.Show(); panel_add_update.Hide(); //Connection and Query DataTable dt = new DataTable(); //sda.Fill(dt); int j = 0; var Top = 10; var Left = 200; for (int i = 0; i < 5; i++) { emp_UC = new UC_Employee_Data(); emp_UC.Width = 550; emp_UC.Height = 25; //emp_UC.label_employee_id.Text = dt.Rows[i][j++].ToString(); //emp_UC.label_employee_name.Text = dt.Rows[i][j++].ToString(); //emp_UC.label_employee_type.Text = dt.Rows[i][j++].ToString(); //emp_UC.label_employee_salary.Text = dt.Rows[i][j++].ToString(); emp_UC.label_employee_id.Text = "A"; emp_UC.label_employee_name.Text = "B"; emp_UC.label_employee_type.Text = "C"; emp_UC.label_employee_salary.Text = "D"; j = 0; emp_UC.Left = 0; emp_UC.Top = Top; panel_data.Controls.Add(emp_UC); modify_UC = new UC_Modify(); modify_UC.Width = 90; modify_UC.Height = 30; modify_UC.Top = Top; modify_UC.Left = Left + 350; panel_data.Controls.Add(modify_UC); Top += 30; } }
private void pic_update_regularexpense_Click(object sender, EventArgs e) { modify_Expense = new Add_Update_Expenses_Form(this); modify_Expense.Function_Name = "Update"; modify_Expense.Expense_Name = "Regular"; PictureBox pic = (PictureBox)sender; UC_Modify mod = (UC_Modify)pic.Parent; dt = cls_expense.RegularExpenseDetailShowByRegularExpenseID(mod.value.ToString()); modify_Expense.dt = dt; modify_Expense.Show(); }
private void pic_update_employeesalary_Click(object sender, EventArgs e) { modify_Expense = new Add_Update_Expenses_Form(this); modify_Expense.Function_Name = "Update"; modify_Expense.Expense_Name = "Salary"; PictureBox pic = (PictureBox)sender; UC_Modify mod = (UC_Modify)pic.Parent; dt = cls_expense.EmployeeSalaryDetailShowByEmpSalaryId(mod.value.ToString()); modify_Expense.dt = dt; modify_Expense.Show(); }
private void pic_info_Click(object sender, EventArgs e) { label_function_name.Text = "Project Info"; Projects_form pro_form = new Projects_form(); groupBox_WorkingEmp.Show(); add_Btn.Hide(); update_Btn.Hide(); edit_Button.Show(); panel_proj_info_modify.Show(); disabletextboxes(); PictureBox pic = (PictureBox)sender; UC_Modify mod = (UC_Modify)pic.Parent; dt = cls_project.ProjectSearchByID(mod.value.ToString()); txt_id_proj.Text = dt.Rows[0][col1++].ToString(); txt_startdate_proj.Text = dt.Rows[0][col1++].ToString(); txt_name_proj.Text = dt.Rows[0][col1++].ToString(); txt_description_proj.Text = dt.Rows[0][col1++].ToString(); txt_consultant_proj.Text = dt.Rows[0][col1++].ToString(); txt_amount_proj.Text = dt.Rows[0][col1++].ToString(); txt_completedate_proj.Text = dt.Rows[0][col1++].ToString(); txt_delieverydate_proj.Text = dt.Rows[0][col1++].ToString(); txt_dateproject.Text = dt.Rows[0][col1++].ToString(); col1 = 0; dt = cls_project.EmployeesAssigentToProjectID(Convert.ToInt32(mod.value)); panel_emp_working_projects.Controls.Clear(); var Top = 10; Label newlabel; for (int i = 0; i < dt.Rows.Count; i++) { newlabel = new Label(); newlabel.Left = 20; newlabel.Height = 15; newlabel.Top = Top; newlabel.Text = dt.Rows[i][0].ToString(); panel_emp_working_projects.Controls.Add(newlabel); Top += 20; } }
public void get_UC() { panel_data.Controls.Clear(); panel_data.Show(); panel_proj_info_modify.Hide(); int j = 0; var Top = 10; var Left = 200; for (int i = 0; i < count; i++) { proj_UC = new UC_Project_Data(); proj_UC.Width = 580; proj_UC.Height = 25; proj_UC.label_project_name.Text = dt.Rows[i][j++].ToString(); proj_UC.label_project_id.Text = dt.Rows[i][j++].ToString(); proj_UC.label_project_status.Text = dt.Rows[i][j++].ToString(); proj_UC.label_project_amount.Text = dt.Rows[i][j++].ToString(); j = 0; proj_UC.Left = 0; proj_UC.Top = Top; panel_data.Controls.Add(proj_UC); modify_UC = new UC_Modify(); modify_UC.Width = 90; modify_UC.Height = 30; modify_UC.Top = Top; modify_UC.Left = Left + 400; modify_UC.value = dt.Rows[i][1].ToString(); panel_data.Controls.Add(modify_UC); Top += 30; modify_UC.pic_update.Click += new EventHandler(pic_update_Click); modify_UC.pic_delete.Click += new EventHandler(pic_delete_Click); modify_UC.pic_info.Click += new EventHandler(pic_info_Click); } }
private void pic_update_academyincome_Click(object sender, EventArgs e) { panel_add_student.Hide(); modify = new Add_Update_Income_Form(this); PictureBox pic = (PictureBox)sender; UC_Modify mod = (UC_Modify)pic.Parent; dt = cls_income.Academydatashowbyacademyincomeid(mod.value.ToString()); modify.Function_Name = "Update"; modify.Income_Type = "Academy"; modify.dt = this.dt; modify.Show(); }
public void get_UC() { panel_data.Controls.Clear(); panel_data.Show(); panel_emp_info_modify.Hide(); int j = 0; var Top = 10; var Left = 200; for (int i = 0; i < count; i++) { emp_UC = new UC_Employee_Data(); emp_UC.Width = 550; emp_UC.Height = 25; emp_UC.label_employee_name.Text = dt.Rows[i][j++].ToString(); emp_UC.label_employee_id.Text = dt.Rows[i][j++].ToString(); emp_UC.label_employee_type.Text = dt.Rows[i][j++].ToString(); emp_UC.label_employee_salary.Text = dt.Rows[i][j++].ToString(); j = 0; emp_UC.Left = 0; emp_UC.Top = Top; panel_data.Controls.Add(emp_UC); modify_UC = new UC_Modify(); modify_UC.Width = 90; modify_UC.Height = 30; modify_UC.value = dt.Rows[i][1].ToString(); modify_UC.Top = Top; modify_UC.Left = Left + 350; panel_data.Controls.Add(modify_UC); Top += 30; modify_UC.pic_update.Click += new EventHandler(pic_update_Click); modify_UC.pic_delete.Click += new EventHandler(pic_delete_Click); modify_UC.pic_info.Click += new EventHandler(pic_info_Click); } }
public void get_UC_Month() { int j = 1; var Top = 10; var Left = 200; panel_month_data.BringToFront(); panel_month_data.Controls.Clear(); for (int i = 0; i < count; i++) { month_UC = new UC_Attendance_Month_Data(); month_UC.label_Attendance_EmpName.Text = dt.Rows[i][j++].ToString(); month_UC.label_Attendance_EmpID.Text = dt.Rows[i][j++].ToString(); month_UC.label_Attendance_Date.Text = (Convert.ToDateTime(dt.Rows[i][j++].ToString()).ToString("dd/MMM/yyyy")); month_UC.label_Attendance_Intime.Text = dt.Rows[i][j++].ToString(); month_UC.label_Attendance_Outtime.Text = dt.Rows[i][j++].ToString(); month_UC.label_Attendance_Status.Text = dt.Rows[i][j++].ToString(); month_UC.Width = 700; month_UC.Height = 30; month_UC.Left = 0; month_UC.Top = Top; panel_month_data.Controls.Add(month_UC); modify_UC = new UC_Modify(); modify_UC.Width = 30; modify_UC.Height = 30; modify_UC.Left = Left + 500; modify_UC.Top = Top + 3; modify_UC.value = dt.Rows[i][0].ToString(); panel_month_data.Controls.Add(modify_UC); Top += 30; j = 1; modify_UC.pic_update.Click += new EventHandler(pic_update_attendance_Click); } }
public void get_UC() { panel_data.Controls.Clear(); panel_data.Show(); panel_consl_info_modify.Hide(); int j = 0; var Top = 10; var Left = 200; for (int i = 0; i < count; i++) { cons_UC = new UC_Consultant_Data(); cons_UC.Width = 550; cons_UC.Height = 25; cons_UC.label_cons_id.Text = dt.Rows[i][j++].ToString(); cons_UC.label_cons_name.Text = dt.Rows[i][j++].ToString(); cons_UC.label_cons_phone1.Text = dt.Rows[i][j++].ToString(); cons_UC.label_cons_phone2.Text = dt.Rows[i][j++].ToString(); j = 0; cons_UC.Left = 5; cons_UC.Top = Top; panel_data.Controls.Add(cons_UC); modify_UC = new UC_Modify(); modify_UC.Width = 90; modify_UC.Height = 30; modify_UC.value = dt.Rows[i][0].ToString(); modify_UC.Top = Top; modify_UC.Left = Left + 370; panel_data.Controls.Add(modify_UC); Top += 30; modify_UC.pic_update.Click += new EventHandler(pic_update_Click); modify_UC.pic_delete.Click += new EventHandler(pic_delete_Click); modify_UC.pic_info.Click += new EventHandler(pic_info_Click); } }
public void get_UC() { panel_data.Controls.Clear(); panel_data.Show(); int j = 0; var Top = 10; var Left = 200; for (int i = 0; i < count; i++) { login_UC = new UC_Login_Info_Data(); login_UC.Width = 630; login_UC.Height = 25; login_UC.label_login_id.Text = dt.Rows[i][j++].ToString(); login_UC.label_login_username.Text = dt.Rows[i][j++].ToString(); login_UC.label_login_password.Text = dt.Rows[i][j++].ToString(); login_UC.label_login_userrole.Text = dt.Rows[i][j++].ToString(); j = 0; login_UC.Left = 0; login_UC.Top = Top; panel_data.Controls.Add(login_UC); modify_UC = new UC_Modify(); modify_UC.Width = 60; modify_UC.Height = 30; modify_UC.value = dt.Rows[i][1].ToString(); modify_UC.Top = Top; modify_UC.Left = Left + 450; panel_data.Controls.Add(modify_UC); Top += 30; modify_UC.pic_update.Click += new EventHandler(pic_update_login_acoount_Click); modify_UC.pic_delete.Click += new EventHandler(pic_delete_login_acoount_Click); } }
private void pic_update_login_acoount_Click(object sender, EventArgs e) { modify_login = new Add_Update_LoginInfo_Form(this); modify_login.label_LoginInfo.Text = "Update Login Info"; PictureBox pic = (PictureBox)sender; UC_Modify mod = (UC_Modify)pic.Parent; dt = cls_login.LoginInfoDetailByUsername(mod.value.ToString()); modify_login.btn_Update_LoginInfo.BringToFront(); modify_login.txt_LoginInfo_Username.Text = dt.Rows[0][0].ToString(); modify_login.txt_LoginInfo_Password.Text = dt.Rows[0][1].ToString(); modify_login.txt_LoginInfo_UserRole.Text = dt.Rows[0][2].ToString(); modify_login.txt_LoginInfo_Username.ReadOnly = true; modify_login.Show(); }
private void pic_update_withdrawal_Click(object sender, EventArgs e) { modify_withdrawal = new Add_Update_Withdrawal_Form(this); PictureBox pic = (PictureBox)sender; UC_Modify mod = (UC_Modify)pic.Parent; dt = cls_withdrawal.ProcWithdrawalDatailShowById(mod.value.ToString()); modify_withdrawal.txt_withdrawal_id.Text = dt.Rows[0][0].ToString(); modify_withdrawal.txt_withdrawal_name.Text = dt.Rows[0][1].ToString(); modify_withdrawal.txt_withdrawal_amount.Text = dt.Rows[0][2].ToString(); modify_withdrawal.txt_withdrawal_date.Text = Convert.ToDateTime(dt.Rows[0][3].ToString()).ToShortDateString(); modify_withdrawal.txt_withdrawal_note.Text = dt.Rows[0][4].ToString(); modify_withdrawal.label_Withdrawal.Text = "Update Withdrawal"; modify_withdrawal.btn_Update_Withdrawal.BringToFront(); modify_withdrawal.txt_withdrawal_id.ReadOnly = true; modify_withdrawal.txt_withdrawal_date.Enabled = false; modify_withdrawal.Show(); }
private void pic_info_Click(object sender, EventArgs e) { groupBox_Active_Projects.Show(); groupBox_Completed_Projects.Show(); groupBox_income.Show(); label_function_name.Text = "Consultant Info"; add_Btn.Hide(); edit_BTn.Show(); update_Btn.Hide(); panel_consl_info_modify.Show(); disabletextboxes(); PictureBox pic = (PictureBox)sender; UC_Modify mod = (UC_Modify)pic.Parent; dt = cls_consultant.ConsultantAllDetailsByCons_ID(mod.value.ToString()); txt_cons_id.Text = dt.Rows[0][0].ToString(); txt_cons_name.Text = dt.Rows[0][1].ToString(); txt_cons_father.Text = dt.Rows[0][2].ToString(); txt_cons_dob.Text = Convert.ToDateTime(dt.Rows[0][3].ToString()).ToShortDateString(); txt_cons_gender.Text = dt.Rows[0][4].ToString(); txt_cons_address.Text = dt.Rows[0][5].ToString(); txt_cons_phone1.Text = dt.Rows[0][6].ToString(); txt_cons_phone2.Text = dt.Rows[0][7].ToString(); dt = cls_consultant.ConsultantEarning(mod.value.ToString()); if (dt.Rows.Count > 0) { if (dt.Rows[0][0].ToString() == "") { txt_cons_earn_income.Text = "0"; } else { txt_cons_earn_income.Text = dt.Rows[0][0].ToString(); } } else { txt_cons_earn_income.Text = "0"; } dt = cls_consultant.ConsultantexpectedEarnings(mod.value.ToString()); if (dt.Rows.Count > 0) { if (dt.Rows[0][0].ToString() == "") { txt_cons_exp_income.Text = "0"; } else { txt_cons_exp_income.Text = dt.Rows[0][0].ToString(); } } else { txt_cons_exp_income.Text = "0"; } dt = cls_consultant.ConsultantOngoingProject(mod.value.ToString()); panel_active_projects.Controls.Clear(); var Top = 20; Label newlabel; for (int i = 0; i < dt.Rows.Count; i++) { newlabel = new Label(); newlabel.Left = 20; newlabel.Height = 15; newlabel.Top = Top; newlabel.Text = dt.Rows[i][1].ToString(); panel_active_projects.Controls.Add(newlabel); Top += 20; } dt = cls_consultant.ConsultantCompletedProject(mod.value.ToString()); panel_completed_projects.Controls.Clear(); Top = 20; for (int i = 0; i < dt.Rows.Count; i++) { newlabel = new Label(); newlabel.Left = 20; newlabel.Height = 15; newlabel.Top = Top; newlabel.Text = dt.Rows[i][1].ToString(); panel_completed_projects.Controls.Add(newlabel); Top += 20; } }
private void pic_info_Click(object sender, EventArgs e) { groupBox_Active_Projects.Show(); groupBox_Completed_Projects.Show(); groupBox_Employee_Skills.Show(); label_function_name.Text = "Employee Info"; panel_emp_info_modify.Show(); disable_textboxes(); btn_edit.Show(); add_Btn.Hide(); update_Btn.Hide(); PictureBox pic = (PictureBox)sender; UC_Modify mod = (UC_Modify)pic.Parent; dt = cls_employee.SearchEmpById(mod.value.ToString()); txt_emp_name.Text = dt.Rows[0][0].ToString(); txt_emp_father_name.Text = dt.Rows[0][1].ToString(); txt_emp_cnic.Text = dt.Rows[0][2].ToString(); txt_emp_dob.Text = dt.Rows[0][3].ToString(); txt_emp_address.Text = dt.Rows[0][4].ToString(); txt_emp_agreement.Text = dt.Rows[0][5].ToString(); txt_emp_type.Text = dt.Rows[0][6].ToString(); txt_emp_gender.Text = dt.Rows[0][7].ToString(); txt_emp_designation.Text = dt.Rows[0][8].ToString(); txt_emp_qualification.Text = dt.Rows[0][9].ToString(); txt_emp_phone1.Text = dt.Rows[0][10].ToString(); txt_emp_phone2.Text = dt.Rows[0][11].ToString(); txt_employee_id.Text = dt.Rows[0][12].ToString(); txt_emp_salary.Text = dt.Rows[0][13].ToString(); dt = cls_employee.Search_ongoing_project_names(mod.value.ToString()); panel_active_projects.Controls.Clear(); var Top = 20; Label newlabel; for (int i = 0; i < dt.Rows.Count; i++) { newlabel = new Label(); newlabel.Left = 20; newlabel.Height = 15; newlabel.Top = Top; newlabel.Text = dt.Rows[i][0].ToString(); panel_active_projects.Controls.Add(newlabel); Top += 20; } dt = cls_employee.Search_completed_project_names(mod.value.ToString()); panel_completed_projects.Controls.Clear(); Top = 20; for (int i = 0; i < dt.Rows.Count; i++) { newlabel = new Label(); newlabel.Left = 20; newlabel.Height = 15; newlabel.Top = Top; newlabel.Text = dt.Rows[i][0].ToString(); panel_completed_projects.Controls.Add(newlabel); Top += 20; } dt = cls_employee.ShowEmployeeSkills(mod.value.ToString()); panel_EmpSkills.Controls.Clear(); Top = 20; for (int i = 0; i < dt.Rows.Count; i++) { newlabel = new Label(); newlabel.Left = 20; newlabel.Height = 15; newlabel.Top = Top; newlabel.Text = dt.Rows[i][0].ToString(); panel_EmpSkills.Controls.Add(newlabel); Top += 20; } }
public void get_academy_UC() { panel_add_student.Hide(); panel_academy_data.Controls.Clear(); panel_academy_data.Show(); panel_Academy_Income.BringToFront(); int j = 0; var Top = 10; var Left = 200; //MessageBox.Show(DateTime.Now.Date.ToString()); for (int i = 0; i < count; i++) { academy_income_UC = new UC_Academy_Income_Data(); academy_income_UC.Width = 620; academy_income_UC.Height = 25; academy_income_UC.label_academyincome_id.Text = dt.Rows[i][j++].ToString(); academy_income_UC.label_std_id.Text = dt.Rows[i][j++].ToString(); academy_income_UC.label_std_name.Text = dt.Rows[i][j++].ToString(); academy_income_UC.label_std_amount.Text = dt.Rows[i][j++].ToString(); academy_income_UC.label_std_date.Text = (Convert.ToDateTime(dt.Rows[i][j++].ToString()).ToString("dd/MMM/yyyy")); academy_income_UC.Left = 0; academy_income_UC.Top = Top; panel_academy_data.Controls.Add(academy_income_UC); modify_UC = new UC_Modify(); modify_UC.Width = 30; modify_UC.Height = 30; modify_UC.Top = Top; modify_UC.Left = Left + 440; modify_UC.value = dt.Rows[i][0].ToString(); panel_academy_data.Controls.Add(modify_UC); txt_rich = new RichTextBox(); txt_rich.Top = Top; txt_rich.Height = 30; txt_rich.Width = 200; txt_rich.Left = Left + 505; txt_rich.Text = dt.Rows[i][j++].ToString(); txt_rich.Enabled = false; panel_academy_data.Controls.Add(txt_rich); Top += 60; j = 0; modify_UC.pic_update.Click += new EventHandler(pic_update_academyincome_Click); //modify_UC.pic_delete.Click += new EventHandler(pic_delete_Click); //modify_UC.pic_info.Click += new EventHandler(pic_info_Click); } }