Exemplo n.º 1
0
 public frm_employees(employee_assets_controller TransferAsset, int employeeId, int assetId)
 {
     InitializeComponent();
     _transfer_assets = TransferAsset;
     _employee_id     = employeeId;
     _asset_id        = assetId;
 }
Exemplo n.º 2
0
        public frm_add_asset(employee_assets_controller UpdateAsset, int AssetId, int UserId)
        {
            InitializeComponent();
            this._updateAsset = UpdateAsset;
            this._assetID     = AssetId;
            //this._employeeID = EmployeeId;
            this._user_id = UserId;

            Users user = new Users();

            user.Id            = this._user_id;
            this._privilege_id = user.SelectUser();
        }
        private void dg_employee_assets_CellClick_1(object sender, DataGridViewCellEventArgs e)
        {
            var employee_id = int.Parse(dg_employee_assets.CurrentRow.Cells["EmployeeId"].Value.ToString());
            var senderGrid  = (DataGridView)sender;

            if (senderGrid.Columns[e.ColumnIndex] is DataGridViewButtonColumn &&
                e.RowIndex >= 0)
            {
                switch (senderGrid.Columns[e.ColumnIndex].HeaderText)
                {
                case "View":
                    this.HideControls();
                    employee_assets_controller _employee_asset = new employee_assets_controller(employee_id, this._user_id);
                    this.Controls.Add(_employee_asset);

                    break;

                case "Print":
                    //frm_preview_assets _print = new frm_preview_assets(employee_id);
                    //_print.ShowDialog();
                    break;
                }
            }
        }
Exemplo n.º 4
0
 public frm_delete_asset(employee_assets_controller EmployeeAsset, int Id)
 {
     InitializeComponent();
     this._employee_assets = EmployeeAsset;
     this._asset_id        = Id;
 }
Exemplo n.º 5
0
 public frm_add_asset(employee_assets_controller UpdateAsset, int EmployeeId)
 {
     InitializeComponent();
     this._updateAsset = UpdateAsset;
     this._employeeID  = EmployeeId;
 }