Esempio n. 1
0
    protected void bindPositionCategoryComboBox()
    {
        DataSetGlobal.PositionCategoryDataTable dt = new DataSetGlobal.PositionCategoryDataTable();
        DataSetGlobalTableAdapters.PositionCategoryTableAdapter ta = new DataSetGlobalTableAdapters.PositionCategoryTableAdapter();
        ta.Fill(dt, (String)HttpContext.Current.Session["currentContract"]);

        this.ComboBoxPositionCategory.DataSource = dt;
        dt.AddPositionCategoryRow("select", "select");
        this.ComboBoxPositionCategory.DataTextField = dt.PositionCategoryColumn.ToString();
        this.ComboBoxPositionCategory.DataValueField = dt.PositionCategoryColumn.ToString();
        this.ComboBoxPositionCategory.SelectedValue = "select";
        this.ComboBoxPositionCategory.DataBind();
    }
Esempio n. 2
0
    protected void Page_Load(object sender, EventArgs e)
    {
        //Get list of trades and position categories of the current contract
        dtTrade = new DataSetGlobal.TradeDataTable();
        DataSetGlobalTableAdapters.TradeTableAdapter ta = new DataSetGlobalTableAdapters.TradeTableAdapter();
        ta.Fill(dtTrade, (String)HttpContext.Current.Session["currentContract"]);
        dtTrade.AddTradeRow("select", "select");

        dtPositionCategory = new DataSetGlobal.PositionCategoryDataTable();
        DataSetGlobalTableAdapters.PositionCategoryTableAdapter ta2 = new DataSetGlobalTableAdapters.PositionCategoryTableAdapter();
        ta2.Fill(dtPositionCategory, (String)HttpContext.Current.Session["currentContract"]);
        dtPositionCategory.AddPositionCategoryRow("select", "select");

        if (this.GridView1.Rows.Count == 0)
        {
            this.LabelNoRecordFound.Visible = true;
        }

        if (GridViewAddWorkers.Rows.Count == 0)
        {
            LabelNoExistingWorker.Visible = true;
        }

        hideContractorCAItems();
    }