コード例 #1
0
        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();
        }
コード例 #2
0
ファイル: AreaController.cs プロジェクト: tvmindia/TVMWPsm60
 // GET: Area
 #region Constructor Injection
 public AreaController(IAreaBusiness areaBusiness, IStateBusiness stateBusiness,
                       IDistrictBusiness districtBusiness, SecurityFilter.ToolBarAccess tool)
 {
     _areaBusiness     = areaBusiness;
     _stateBusiness    = stateBusiness;
     _districtBusiness = districtBusiness;
     _tool             = tool;
 }
コード例 #3
0
 public DistrictListForm()
 {
     InitializeComponent();
     grdDistrict.AutoGenerateColumns = false;
     _cityBusiness         = new CityBusiness();
     _districtBusiness     = new DistrictBusiness();
     cbbCity.DisplayMember = nameof(City.Name);
     cbbCity.ValueMember   = nameof(City.CityCode);
 }
コード例 #4
0
        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();
        }
コード例 #5
0
        public DistrictListForm()
        {
            InitializeComponent();

            lblDistrictCode.Text = "";
            lblDistrictName.Text = "";
            lblCityName.Text     = "";

            dgvDistrictList.AutoGenerateColumns = false;

            _districtBusiness = new DistrictBusiness();
            _cityBusiness     = new CityBusiness();


            //Dependency Injection - IoC
        }
コード例 #6
0
 // GET: District
 #region Constructor Injection
 public DistrictController(IDistrictBusiness districtBusiness, IStateBusiness stateBusiness, SecurityFilter.ToolBarAccess tool)
 {
     _districtBusiness = districtBusiness;
     _stateBusiness    = stateBusiness;
     _tool             = tool;
 }
コード例 #7
0
 public DistrictController(CurrentProcess process, IDistrictBusiness districtBusiness) : base(process)
 {
     m_DistrictBusiness = districtBusiness;
 }