Exemplo n.º 1
0
        /// <summary>
        /// Init variables
        /// </summary>
        /// <author>Trada</author>
        /// <date>Friday, June 10 2005</date>
        private void InitVariable()
        {
            // Load combo box
            UtilsBO boUtil = new UtilsBO();
            DataSet dstCCN = boUtil.ListCCN();

            cboCCN.DataSource    = dstCCN.Tables[MST_CCNTable.TABLE_NAME];
            cboCCN.DisplayMember = MST_CCNTable.CODE_FLD;
            cboCCN.ValueMember   = MST_CCNTable.CCNID_FLD;
            FormControlComponents.PutDataIntoC1ComboBox(cboCCN, dstCCN.Tables[MST_CCNTable.TABLE_NAME], MST_CCNTable.CODE_FLD, MST_CCNTable.CCNID_FLD, MST_CCNTable.TABLE_NAME);
            if (SystemProperty.CCNID != 0)
            {
                cboCCN.SelectedValue = SystemProperty.CCNID;
            }
            // Load combo box displays approving date
            PRO_WorkOrderDetailVO voWorkOrderDetail = new PRO_WorkOrderDetailVO();

            voWorkOrderDetail.MfgCloseDate = boUtil.GetDBDate();
            if ((DateTime.MinValue < voWorkOrderDetail.MfgCloseDate) && (voWorkOrderDetail.MfgCloseDate < DateTime.MaxValue))
            {
                dtmPostDate.Value = voWorkOrderDetail.MfgCloseDate;
            }
            else
            {
                dtmPostDate.Value = DBNull.Value;
            }
        }