private void LoadDepartments() { RSLib.COListItem li; SqlDataReader dr; dr = CBDepartment.GetList(); clstDepartments.Items.Clear(); li = new RSLib.COListItem(); li.ID = 0; li.Description = "All"; clstDepartments.Items.Add(li); while (dr.Read()) { li = new RSLib.COListItem(); li.ID = Convert.ToInt32(dr["ID"]); li.Description = dr["Name"].ToString(); clstDepartments.Items.Add(li); } clstDepartments.SetItemChecked(0, true); dr.Close(); }
private void LoadProjects() { SqlDataReader dr; RSLib.COListItem li; //SSS 20131105 dr = CBProject.GetList(); dr = CBProject.GetListProj(); clstProjects.Items.Clear(); li = new RSLib.COListItem(); li.ID = 0; li.Description = "All"; clstProjects.Items.Add(li); while (dr.Read()) { li = new RSLib.COListItem(); li.ID = Convert.ToInt32(dr["ID"]); li.Description = dr["Number"].ToString(); clstProjects.Items.Add(li); } clstProjects.SetItemChecked(0, true); dr.Close(); }
private void LoadMasterBox() { SqlDataReader dr; RSLib.COListItem li; dr = CBProject.GetListMaster(); cboMasterJobs.Items.Clear(); li = new RSLib.COListItem(); li.ID = 0; li.Description = ""; cboMasterJobs.Items.Add(li); while (dr.Read()) { li = new RSLib.COListItem(); li.ID = Convert.ToInt32(dr["ID"]); li.Description = dr["Number"].ToString(); cboMasterJobs.Items.Add(li); } dr.Close(); }
private void LoadActivityCodes() { RSLib.COListItem li; SqlDataReader dr; cboActivityCodes.Items.Clear(); dr = CBActivityCode.GetList(); li = new RSLib.COListItem(); li.ID = 0; li.Description = ""; cboActivityCodes.Items.Add(li); while (dr.Read()) { li = new RSLib.COListItem(); li.ID = Convert.ToInt32(dr["ID"]); li.Description = dr["Code"].ToString(); cboActivityCodes.Items.Add(li); } dr.Close(); }
private void LoadLocationBox(int custID) { SqlDataReader dr; RSLib.COListItem li; dr = CBLocation.GetList(custID); cboLocation.Items.Clear(); li = new RSLib.COListItem(); li.ID = 0; li.Description = NEWCOMBOENTRY; cboLocation.Items.Add(li); while (dr.Read()) { li = new RSLib.COListItem(); li.ID = Convert.ToInt32(dr["ID"]); li.Description = dr["City"].ToString() + ", " + dr["Abbrev"].ToString(); cboLocation.Items.Add(li); } dr.Close(); }
void floc_OnAddLocation(int itmID, string description) { RSLib.COListItem li = new RSLib.COListItem(); li.ID = 0; li.Description = description + ", " + CBState.GetAbbrev(itmID); li.Meta = itmID.ToString(); li.Meta1 = description; lstLocations.Items.Add(li); mbItemChanged = true; SetSaveButtons(); }
void floc_OnChangeLocation(int itmID, string description) { RSLib.COListItem li = new RSLib.COListItem(); li.ID = ((RSLib.COListItem)lstLocations.SelectedItem).ID; li.Description = description + ", " + CBState.GetAbbrev(itmID); li.Meta = itmID.ToString(); li.Meta1 = description; //lstLocations.Items[lstLocations.SelectedIndex] = description + ", " + CBState.GetAbbrev(itmID); lstLocations.Items[lstLocations.SelectedIndex] = li; //((RSLib.COListItem)lstLocations.SelectedItem).Description = description + ", " + CBState.GetAbbrev(itmID); //((RSLib.COListItem)lstLocations.SelectedItem).Meta = itmID.ToString(); //((RSLib.COListItem)lstLocations.SelectedItem).Meta1 = description; mbItemChanged = true; SetSaveButtons(); }
private void LoadAvailableEmployees() { SqlDataReader dr; RSLib.COListItem li; dr = CBEmployee.GetListByDept(miCurrDept); lstAvailable.Items.Clear(); while (dr.Read()) { li = new RSLib.COListItem(); li.ID = Convert.ToInt32(dr["ID"]); li.Description = dr["Name"].ToString(); lstAvailable.Items.Add(li); } dr.Close(); }
private void LoadDepartmentBox() { SqlDataReader dr; RSLib.COListItem li; dr = CBDepartment.GetList(); lstDept.Items.Clear(); while (dr.Read()) { li = new RSLib.COListItem(); li.ID = Convert.ToInt32(dr["ID"]); li.Description = dr["Name"].ToString(); lstDept.Items.Add(li); } dr.Close(); }
private void LoadTitleBox() { SqlDataReader dr; RSLib.COListItem li; dr = CBEmployeeTitle.GetList(); cboTitle.Items.Clear(); while (dr.Read()) { li = new RSLib.COListItem(); li.ID = Convert.ToInt32(dr["ID"]); li.Description = dr["Name"].ToString(); cboTitle.Items.Add(li); } dr.Close(); }
private void LoadDrawingSizes() { RSLib.COListItem li; SqlDataReader dr; cboDrawingSizes.Items.Clear(); dr = CBDrawingSize.GetList(); while (dr.Read()) { li = new RSLib.COListItem(); li.ID = Convert.ToInt32(dr["ID"]); li.Description = dr["Size"].ToString(); cboDrawingSizes.Items.Add(li); } dr.Close(); }
private void LoadIssuedAs() { RSLib.COListItem li; SqlDataReader dr; cboIssuedAs.Items.Clear(); dr = CBReleaseDrawing.GetList(); while (dr.Read()) { li = new RSLib.COListItem(); li.ID = Convert.ToInt32(dr["ID"]); li.Description = dr["Name"].ToString(); cboIssuedAs.Items.Add(li); } dr.Close(); }
private void LoadEmpDeptBox() { SqlDataReader dr; RSLib.COListItem li; dr = CBEmployeeDepartment.GetListByEmpID(moEmp.ID); lstEmpDept.Items.Clear(); while (dr.Read()) { li = new RSLib.COListItem(); li.ID = Convert.ToInt32(dr["DepartmentID"]); li.Description = dr["DepartmentName"].ToString(); li.Meta = dr["ID"].ToString(); lstEmpDept.Items.Add(li); } dr.Close(); }
private void LoadReportStatusBox() { RSLib.COListItem li; cboReportStatus.Items.Clear(); li = new RSLib.COListItem(); li.ID = 0; li.Description = "Active"; cboReportStatus.Items.Add(li); li = new RSLib.COListItem(); li.ID = 1; li.Description = "In Active"; cboReportStatus.Items.Add(li); li = new RSLib.COListItem(); li.ID = 2; li.Description = "Hold"; cboReportStatus.Items.Add(li); cboReportStatus.SelectedIndex = 0; cboReportStatus.Text = "Active"; }
private void LoadLeads(int deptID) { SqlDataReader dr; RSLib.COListItem li; dr = CBEmployee.GetListByDept(deptID); clstProjects.Items.Clear(); while (dr.Read()) { li = new RSLib.COListItem(); li.ID = Convert.ToInt32(dr["ID"]); li.Description = dr["Name"].ToString(); clstProjects.Items.Add(li); } clstProjects.SetItemChecked(0, true); dr.Close(); }
private void LoadLocations(int custID) { SqlDataReader dr; RSLib.COListItem li; dr = CBLocation.GetList(custID); lstLocations.Items.Clear(); while (dr.Read()) { li = new RSLib.COListItem(); li.ID = Convert.ToInt32(dr["ID"]); li.Description = dr["City"].ToString() + ", " + dr["Abbrev"].ToString(); li.Meta = dr["StateID"].ToString(); li.Meta1 = dr["City"].ToString(); lstLocations.Items.Add(li); } dr.Close(); }