Beispiel #1
0
        private void grdBase_onLoadDataGrid(object sender, Control.GridView.DataBindArgs e)
        {
            Material entity = new Material();

            entity.material_name        = txtName.Text;
            entity.material_description = txtDesc.Text;
            entity.material_code        = txtCode.Text;
            if (cbxGroup.SelectedIndex > 0)
            {
                entity.material_group_id = cbxGroup.SelectedValue.ToLong();
            }
            grdBase.DataSourceDataSet = ServiceProvider.MaterialService.GetGridMaterial(entity);

            grdBase.DataKeyName      = new string[] { DataKeyID };
            grdBase.HiddenColumnName = new List <string>()
            {
                "ID", "Group Id", "Acceptable Variance", "Picture"
            };

            //try to set its visibility
            this.grdBase.btnAddVisible    = false;
            this.grdBase.btnDeleteVisible = false;
            this.grdBase.btnAddEnable     = false;
            this.grdBase.btnDeleteEnable  = false;
            grdBase.RearrangeButton();
        }
Beispiel #2
0
        private void grdBase_onLoadDataGrid(object sender, Control.GridView.DataBindArgs e)
        {
            PortfolioHead entity = new PortfolioHead();

            entity.portfolio_head_name = txtName.Text;
            entity.portfolio_head_code = txtCode.Text;
            entity.portfolio_head_desc = txtDesc.Text;

            grdBaseHead.DataSourceDataSet = ServiceProvider.PortfolioHeadService.GetGridPortfolioHead(entity);

            grdBaseHead.DataKeyName      = new string[] { DataKeyID };
            grdBaseHead.HiddenColumnName = new List <string>()
            {
                "ID"
            };
        }