Пример #1
0
        private void action(int rowIndex)
        {
            int    i    = rowIndex;
            string type = dgItems.Rows[i].Cells[2].Value.ToString();

            if (string.Equals(type, "zfin", StringComparison.OrdinalIgnoreCase) || string.Equals(type, "zfor", StringComparison.OrdinalIgnoreCase) || string.Equals(type, "zcom", StringComparison.OrdinalIgnoreCase) || string.Equals(type, "zpkg", StringComparison.OrdinalIgnoreCase))
            {
                int             zfinIndex = Convert.ToInt32(dgItems.Rows[i].Cells[1].Value);
                frmZfinOverview zo        = new frmZfinOverview(zfinIndex, this);
                zo.Show();
            }
            else if (string.Equals(type, "Kontakt", StringComparison.OrdinalIgnoreCase))
            {
                int        contactId = Convert.ToInt32(dgItems.Rows[i].Cells[1].Value);
                frmContact co        = new frmContact(contactId, this);
                co.Show();
            }
            else if (string.Equals(type, "Sold-to", StringComparison.OrdinalIgnoreCase) || string.Equals(type, "Ship-to", StringComparison.OrdinalIgnoreCase) || string.Equals(type, "Carrier", StringComparison.OrdinalIgnoreCase))
            {
                int        companyId = Convert.ToInt32(dgItems.Rows[i].Cells[1].Value);
                frmCompany cp        = new frmCompany(companyId, this);
                cp.Show();
            }
            else
            {
                MessageBox.Show("Funkcja nie jest jeszcze dostępna");
            }
        }
Пример #2
0
 public frmContact(int contId, frmCompany parent)
 {
     InitializeComponent();
     contactId  = contId;
     this.Owner = parent;
 }