protected void FillRecordsFromGridView(int RowNum) { DataSet dsMain = new DataSet(); Employee = SetValue(); Employee.EmpCode = ((HiddenField)grdSearchResult.Rows[RowNum].Cells[0].FindControl("lnkbtnCode")).Value == " " ? "" : ((HiddenField)grdSearchResult.Rows[RowNum].Cells[0].FindControl("lnkbtnCode")).Value; try { dsMain = BAL.BALFactory.Instance.BAL_Employee.FillEmployee(Employee); if (dsMain.Tables[0].Rows.Count > 0) { if (dsMain.Tables[0].Rows[0]["EmployeeSalutation"].ToString() != "") { drpCustSalutation.SelectedValue = "" + dsMain.Tables[0].Rows[0]["EmployeeSalutation"].ToString(); } txtCustomerName.Text = "" + dsMain.Tables[0].Rows[0]["EmployeeName"].ToString(); txtCustomerAddress.Text = "" + dsMain.Tables[0].Rows[0]["EmployeeAddress"].ToString(); txtCustomerPhone.Text = "" + dsMain.Tables[0].Rows[0]["EmployeePhone"].ToString(); txtCustomerMobile.Text = "" + dsMain.Tables[0].Rows[0]["EmployeeMobile"].ToString(); txtCustomerEmailId.Text = "" + dsMain.Tables[0].Rows[0]["EmployeeEmailId"].ToString(); lblCustomerCode.Text = "" + dsMain.Tables[0].Rows[0]["EmployeeCode"].ToString(); } } catch (Exception excp) { ScriptManager.RegisterStartupScript(this.Page, this.GetType(), "ScriptRegistration", "setDivMouseOver('Red', '#999999');", true); lblErr.Text = excp.Message; } finally { } btnDelete.Visible = true; }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { Employee = SetValue(); grdSearchResult.DataSource = BAL.BALFactory.Instance.BAL_Employee.ShowAllCustomer(Employee); grdSearchResult.DataBind(); txtCustomerName.Focus(); } }
public void removePassengerFromTourGroup(DTO.Employee emp, DTO.TourGroup tourGroup) { var dummyEmpl = _bus.getEmployeeById(emp.id); var dummyTourGr = _bus.getTourGroupById(tourGroup.id); if (dummyEmpl.TourGroups.Contains(dummyTourGr)) { dummyEmpl.TourGroups.Remove(dummyTourGr); } _bus.update(dummyEmpl); }
public void addPassengerToTourGroup(DTO.Employee employee, DTO.TourGroup tourGroup) { var dummyEmpl = _bus.getEmployeeById(employee.id); var dummyTourGr = _bus.getTourGroupById(tourGroup.id); if (dummyEmpl.TourGroups.Contains(dummyTourGr) == false) { dummyEmpl.TourGroups.Add(dummyTourGr); } _bus.update(dummyEmpl); }
public void toggleCustomerTourGroupStatus(DTO.Employee employee, DTO.TourGroup tourGroup) { var dummyEmpl = _bus.getEmployeeById(employee.id); var dummyTourGr = _bus.getTourGroupById(tourGroup.id); if (dummyEmpl.TourGroups.Contains(dummyTourGr)) { dummyEmpl.TourGroups.Remove(dummyTourGr); } else { dummyEmpl.TourGroups.Add(dummyTourGr); } _bus.update(dummyEmpl); }
protected void btnUpdate_Click(object sender, EventArgs e) { Employee = SetValue(); Common.Result = BAL.BALFactory.Instance.BAL_Employee.UpdateEmployee(Employee); if (Common.Result == "Record Saved") { ScriptManager.RegisterStartupScript(this.Page, this.GetType(), "ScriptRegistration", "setDivMouseOver('Green', '#999999');", true); lblMsg.Text = "Employee information updated sucessfully."; RefreshForm(); } else { ScriptManager.RegisterStartupScript(this.Page, this.GetType(), "ScriptRegistration", "setDivMouseOver('Red', '#999999');", true); lblErr.Text = Common.Result; } grdSearchResult.DataSource = BAL.BALFactory.Instance.BAL_Employee.ShowAllCustomer(Employee); grdSearchResult.DataBind(); }