Exemplo n.º 1
0
 private void btnTAMBAH_Click(object sender, EventArgs e)
 {
     if (tabCASH.SelectedTab == tabCASH.TabPages["PAID"])//your specific tabname
     {
         if (dgvSTTPAID.SelectedCells.Count > 0)
         {
             int ID = int.Parse(dgvSTTPAID.SelectedCells[0].OwningRow.Cells["ID"].Value.ToString());
             cINV.ID          = ID;
             cINV.KODEINVOICE = dgvSTTPAID.SelectedCells[0].OwningRow.Cells["INVOICE"].Value.ToString();
             FINANCE.FormPEMBAYARANINVOICE frm = new LOGISTICMANAGAMENTSYSTEM.FINANCE.FormPEMBAYARANINVOICE(this, 1, cINV);
             frm.ShowDialog();
         }
     }
     else if (tabCASH.SelectedTab == tabCASH.TabPages["PREPAID"])
     {
         if (dgvPREPAID.SelectedCells.Count > 0)
         {
             int ID = int.Parse(dgvPREPAID.SelectedCells[0].OwningRow.Cells["IDSTTCASH"].Value.ToString());
             c.ID = ID;
             FINANCE.FormPEMBAYARAN frm = new LOGISTICMANAGAMENTSYSTEM.FINANCE.FormPEMBAYARAN(this, 1, c);
             frm.ShowDialog();
         }
         ;
     }
     else
     {
         int ID = int.Parse(dgvCOLLECT.SelectedCells[0].OwningRow.Cells["IDSTTCOLL"].Value.ToString());
         c.ID = ID;
         FINANCE.FormPEMBAYARAN frm = new LOGISTICMANAGAMENTSYSTEM.FINANCE.FormPEMBAYARAN(this, 1, c);
         frm.ShowDialog();
     }
 }
        private void btnTAMBAH_Click(object sender, EventArgs e)
        {
            if (tabCASH.SelectedTab == tabCASH.TabPages["PAID"])//your specific tabname
            {
                if (dgvSTTPAID.SelectedCells.Count > 0)
                {
                    int ID = int.Parse(dgvSTTPAID.SelectedCells[0].OwningRow.Cells["ID"].Value.ToString());
                    cINV.ID = ID;
                    cINV.KODEINVOICE = dgvSTTPAID.SelectedCells[0].OwningRow.Cells["INVOICE"].Value.ToString();
                    FINANCE.FormPEMBAYARANINVOICE frm = new LOGISTICMANAGAMENTSYSTEM.FINANCE.FormPEMBAYARANINVOICE(this, 1, cINV);
                    frm.ShowDialog();
                }
            }
            else if (tabCASH.SelectedTab == tabCASH.TabPages["PREPAID"])
            {
                if (dgvPREPAID.SelectedCells.Count > 0)
                {
                    int ID = int.Parse(dgvPREPAID.SelectedCells[0].OwningRow.Cells["IDSTTCASH"].Value.ToString());
                    c.ID = ID;
                    FINANCE.FormPEMBAYARAN frm = new LOGISTICMANAGAMENTSYSTEM.FINANCE.FormPEMBAYARAN(this, 1, c);
                    frm.ShowDialog();
                };
            }
            else
            {
               int ID = int.Parse(dgvCOLLECT.SelectedCells[0].OwningRow.Cells["IDSTTCOLL"].Value.ToString());
               c.ID = ID;
               FINANCE.FormPEMBAYARAN frm = new LOGISTICMANAGAMENTSYSTEM.FINANCE.FormPEMBAYARAN(this, 1, c);
               frm.ShowDialog();

            }
        }