private void frmAddServiceContract_Load(object sender, EventArgs e) { LoadServiceContract(); //Populate Combo Boxes Place_Holer_Package_List = P_L.ViewPackage(); foreach (Package P in P_L.ViewPackage()) { cmbPackage.Items.Add("Package ID : " + " " + P.Id + " Package Name : " + P.Name); } }//Populate the Combobox and load list
private void frmEditServiceCon_Load(object sender, EventArgs e) { Loadpackage(); //Populate the Service Contacts Place_Holer_Package_List = P_L.ViewPackage(); foreach (Package P in P_L.ViewPackage()) { cmbPackage.Items.Add("Package ID : " + " " + P.Id + " Package Name : " + P.Name); } txtDescription.Text = sc.Description; txtStat.Text = sc.Status; txtCost.Text = sc.Cost.ToString(); dtDateFinal.Value = sc.DateFinalised; dtDateTer.Value = sc.DateTerminated; }
void loadPackages() { // Display the services List_Of_Package_Ob = P_L.ViewPackage(); foreach (Package P in List_Of_Package_Ob) { ListViewItem lst = new ListViewItem(new string[] { P.Id.ToString(), P.Service.ToString(), P.Sla.ToString(), P.Name, P.Description }); lst.Tag = P; } }//load packages
}//Remove a package // public void LoadPackage() { List_OF_Package_Ob = P_L.ViewPackage(); foreach (Package P in List_OF_Package_Ob) { ListViewItem lst = new ListViewItem(new string[] { P.Id.ToString(), P.Service.Description, P.Sla.Description, P.Name, P.Description, P.Category.Name }); lst.Tag = P; listPackage.Items.Add(lst); } }//Load the Packages