public DistrictDetailForm(EditMode editMode, string code = "") { InitializeComponent(); _editMode = editMode; if (_editMode != EditMode.AddNew) { _selectedCode = code; } switch (editMode) { case EditMode.AddNew: Text = @"Add new District"; break; case EditMode.Edit: Text = @"Edit District"; break; case EditMode.View: Text = @"View District Details"; break; } _districtBusiness = new DistrictBusiness(); _cityBusiness = new CityBusiness(); }
// GET: Area #region Constructor Injection public AreaController(IAreaBusiness areaBusiness, IStateBusiness stateBusiness, IDistrictBusiness districtBusiness, SecurityFilter.ToolBarAccess tool) { _areaBusiness = areaBusiness; _stateBusiness = stateBusiness; _districtBusiness = districtBusiness; _tool = tool; }
public DistrictListForm() { InitializeComponent(); grdDistrict.AutoGenerateColumns = false; _cityBusiness = new CityBusiness(); _districtBusiness = new DistrictBusiness(); cbbCity.DisplayMember = nameof(City.Name); cbbCity.ValueMember = nameof(City.CityCode); }
public DistrictDetailForm(bool isAddNew, string code = "") { InitializeComponent(); _isAddNew = isAddNew; if (!isAddNew) { _selectedCode = code; } Text = _isAddNew ? @"Add new District" : @"Edit District"; _cityBusiness = new CityBusiness(); _districtBusiness = new DistrictBusiness(); }
public DistrictListForm() { InitializeComponent(); lblDistrictCode.Text = ""; lblDistrictName.Text = ""; lblCityName.Text = ""; dgvDistrictList.AutoGenerateColumns = false; _districtBusiness = new DistrictBusiness(); _cityBusiness = new CityBusiness(); //Dependency Injection - IoC }
// GET: District #region Constructor Injection public DistrictController(IDistrictBusiness districtBusiness, IStateBusiness stateBusiness, SecurityFilter.ToolBarAccess tool) { _districtBusiness = districtBusiness; _stateBusiness = stateBusiness; _tool = tool; }
public DistrictController(CurrentProcess process, IDistrictBusiness districtBusiness) : base(process) { m_DistrictBusiness = districtBusiness; }