public void AddTenant() { // creates a toggle for the given test, adds all log events under it test = extent.StartTest("Add Tenant"); AddTenant obj = new AddTenant(); obj.AddTenantDetails(); }
public static Form LoadAddTenentForm() { AddTenant add = new AddTenant(); add.BringToFront(); add.TopLevel = false; add.Visible = true; add.FormBorderStyle = FormBorderStyle.None; add.Dock = DockStyle.Fill; return add; }
private void addANewTenantToolStripMenuItem_Click(object sender, EventArgs e) { AddTenant tenant = new AddTenant(); tenant.BringToFront(); tenant.TopLevel = false; tenant.Visible = true; tenant.FormBorderStyle = FormBorderStyle.None; tenant.Dock = DockStyle.Fill; panel1.Controls.Add(tenant); tenant.Show(); DGVTenants.Hide(); }
public void TC_013_03() { try { try { test = extent.StartTest(" Add Tenants Detail for listed property"); OwnerNavigation ObjOwnerNavigation = new OwnerNavigation(); ObjOwnerNavigation.OwnerMethod(); ObjOwnerNavigation.SearchMethod(); Base.test.Log(RelevantCodes.ExtentReports.LogStatus.Info, "Searched property to Add tenant"); } catch { Base.test.Log(RelevantCodes.ExtentReports.LogStatus.Fail, "Error in Search property to Add tenant"); throw; } try { AddTenant ObjAddTenant = new AddTenant(); ObjAddTenant.AddTenantMethod(); Base.test.Log(RelevantCodes.ExtentReports.LogStatus.Info, "Executed Add tenant"); } catch { Base.test.Log(RelevantCodes.ExtentReports.LogStatus.Fail, "Error in execution of Add tenant"); throw; } try { AddTenantLiabilityDetails ObjAddLiabiltyMethod = new AddTenantLiabilityDetails(); ObjAddLiabiltyMethod.AddLiabiltyMethod(); ObjAddLiabiltyMethod.CompleteTenantMethod(); Base.test.Log(RelevantCodes.ExtentReports.LogStatus.Info, "Tenant Details Added"); } catch { Base.test.Log(RelevantCodes.ExtentReports.LogStatus.Fail, "Error while Adding Tenant Liability Details"); throw; } Base.test.Log(RelevantCodes.ExtentReports.LogStatus.Pass, "Added a new tenant to the listed Property"); } catch { Base.test.Log(RelevantCodes.ExtentReports.LogStatus.Fail, "Error in Adding a new tenant to the listed Property"); } }
public void PO_AddTenantToProperty(string TestDataSheetName, int TestDataSetNumber) { // Create a toggle for the test to log events test = extent.StartTest("Add a Tenant to Property"); //Set the excel path and sheet name for the test data for the test case ExcelLib.PopulateInCollection(Base.ExcelPath, TestDataSheetName); // Create an object of the 'Add Tenant' page to perform the given action AddTenant AddTenantObj = new AddTenant(); //Add a new tenant to the specified property AddTenantObj.AddTenantToProperty(TestDataSetNumber); //Verify that the the tenant is displayed as a tenant for the property //Create an instance of the 'Tenants in Properties' page and perform the check TenantsInProperties TenantsInPropertiesObj = new TenantsInProperties(); TenantsInPropertiesObj.VerifyTenantInProperty(TestDataSetNumber); }
public void PO_AddNewTenant() { try { test = extent.StartTest("Check if user is able to Add Tenant using Add new tenant link in Property Owner Dashboard"); PODashboard ObjPODashboard = new PODashboard(); ObjPODashboard.DashboardMethod(); ObjPODashboard.AddTenantMethod(); AddTenant ObjAddTenant = new AddTenant(); ObjAddTenant.AddTenantMethod(); AddTenantLiabilityDetails ObjAddTenantLiability = new AddTenantLiabilityDetails(); ObjAddTenantLiability.AddLiabiltyMethod(); ObjAddTenantLiability.CompleteTenantMethod(); Base.test.Log(RelevantCodes.ExtentReports.LogStatus.Pass, "Verification of AddTenant link done"); } catch { Base.test.Log(RelevantCodes.ExtentReports.LogStatus.Fail, "There is issue with the methods used in Verification of AddTenant link"); } }
private void AddTenant_Click(object sender, EventArgs e) { if (addSSN.Text == "" || Fname.Text == "" || Lname.Text == "" || PhoneNUM.Text == "" || Buildings.Text == "" || UNITS.Text == "") { MessageBox.Show("Please enter all fields."); return; } int success = contobj.AddTenant(Convert.ToInt32(addSSN.Text), Fname.Text, Lname.Text, Convert.ToInt32(PhoneNUM.Text), Buildings.Text, Convert.ToInt32(UNITS.Text)); if (success == 1) { MessageBox.Show("Added."); } else { MessageBox.Show("Tenant not added."); } AddTenant.Refresh(); }