Exemplo n.º 1
0
 private void LoadLkpType()
 {
     // TODO: This line of code loads data into the 'travdataDataSet.lkpType' table. You can move, or remove it, as needed.
     this.lkpTypeTableAdapter.Fill(this.travdataDataSet.lkpType);
     //= lkpTypeDataGridView1.Rows[0];
     LoadLkp(CommonStr.s2i(travdataDataSet.lkpType.Rows[0]["lkpTypeID"].ToString()));
 }
Exemplo n.º 2
0
        private void Add_CC_lkpType(int ATag)
        {
            if (cboLkpType.SelectedIndex < 0)
            {
                MessageBox.Show("No Lookup Selected", "Select Lookup", MessageBoxButtons.OK, MessageBoxIcon.Error);
                return;
            }
            //need current CCID
            DataGridViewRow r = ccDataGridView.CurrentRow;

            if (r != null)
            {
                int ccid      = CommonStr.s2i(r.Cells[0].Value.ToString());
                int lkpTypeID = lsLkpID[cboLkpType.SelectedIndex];
                dmMain.Add_cc_lkpType(ccid, lkpTypeID, ATag);
                //need current lkpTypeID
                //add ccid + lkpType combo to ccLkpType (ATag=0)
            }
            else
            {
                MessageBox.Show("No Calcuation Method Selected", "Select a Calculation Method", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
            //refresh
            LoadCalcLookup();
        }
Exemplo n.º 3
0
        private void btnlkpTypeUpdate_Click(object sender, EventArgs e)
        {
            int             ID   = -1;
            int             ATag = 0;
            DataGridViewRow r    = lkpTypeDataGridView1.CurrentRow;

            if (r != null)
            {
                ID = CommonStr.s2i(r.Cells[0].Value.ToString());
            }
            if (chkLkpType.Checked == true)
            {
                ATag = 1;
            }
            dmMain.AddLkpType(ID, txtlkpType.Text, ATag);
        }
Exemplo n.º 4
0
        private void lkpTypeDataGridView1_SelectionChanged(object sender, EventArgs e)
        {
            DataGridViewRow r = lkpTypeDataGridView1.CurrentRow;

            if (r != null)
            {
                string id = r.Cells[0].Value.ToString();
                LoadLkp(CommonStr.s2i(id));
                txtlkpType.Text    = r.Cells[1].Value.ToString();
                chkLkpType.Checked = false;
                if (r.Cells[2].Value.ToString()[0] == '1')
                {
                    chkLkpType.Checked = true;
                }
            }
        }
Exemplo n.º 5
0
        private void LoadCalcLookup()
        {
            DataGridViewRow r = ccDataGridView.CurrentRow;

            if (r != null)
            {
                int ccid = CommonStr.s2i(r.Cells[0].Value.ToString());
                try
                {
                    this.v_cc_lkp_TypeTableAdapter.FillBy_CCID(this.travdataDataSet.v_cc_lkp_Type, ccid);
                }
                finally
                {
                }
            }
        }
Exemplo n.º 6
0
        private void v_BaseDataGridView_SelectionChanged(object sender, EventArgs e)
        {
            if (v_BaseDataGridView.CurrentRow != null)
            {
                String JobInfoID = v_BaseDataGridView.CurrentRow.Cells["JobInfoID"].Value.ToString();
                String CalcID    = v_BaseDataGridView.CurrentRow.Cells["bcid"].Value.ToString();
                String JobDescr  = v_BaseDataGridView.CurrentRow.Cells["BS"].Value.ToString()
                                   + " - " + v_BaseDataGridView.CurrentRow.Cells["ST"].Value.ToString()
                                   + " - " + v_BaseDataGridView.CurrentRow.Cells["FS"].Value.ToString();

                lblJobInfoID.Text = JobDescr;

                if (JobInfoID == "")
                {
                    JobInfoID = "-1";
                }


                tLkp = frmM.LoadDataLookup(ccid, CommonStr.s2i(JobInfoID), CommonStr.s2i(CalcID), JobDescr);
            }
        }