Exemple #1
0
        void grdLister_CommandCellClick(object sender, EventArgs e)
        {
            try
            {
                if (grdLister.CurrentRow != null && grdLister.CurrentRow is GridViewDataRowInfo)
                {
                    GridCommandCellElement gridCell = (GridCommandCellElement)sender;
                    string name = gridCell.ColumnInfo.Name.ToStr();
                    if (name == "btnEditAddress")
                    {
                        string Address = string.Empty;
                        Address = grdLister.CurrentRow.Cells["Address"].Value.ToStr();
                        long             Id     = grdLister.CurrentRow.Cells["Id"].Value.ToLong();
                        int?             zoneId = grdLister.CurrentRow.Cells["Id"].Value.ToIntorNull();
                        frmAddNewAddress frm    = new frmAddNewAddress(Id, Address, zoneId);
                        frm.ShowDialog();

                        frm.Dispose();
                    }
                }
            }
            catch (Exception ex)
            {
                ENUtils.ShowMessage(ex.Message);
            }
        }
Exemple #2
0
 void grdLister_CellDoubleClick(object sender, GridViewCellEventArgs e)
 {
     try
     {
         if (grdLister.CurrentRow != null && grdLister.CurrentRow is GridViewDataRowInfo)
         {
             string Address = string.Empty;
             Address = grdLister.CurrentRow.Cells["Address"].Value.ToStr();
             long             Id  = grdLister.CurrentRow.Cells["Id"].Value.ToLong();
             frmAddNewAddress frm = new frmAddNewAddress(Id, Address, grdLister.CurrentRow.Cells["ZoneId"].Value.ToIntorNull());
             frm.ShowDialog();
         }
     }
     catch (Exception ex)
     {
         ENUtils.ShowMessage(ex.Message);
     }
 }
Exemple #3
0
        private void btnAddNewAddress_Click(object sender, EventArgs e)
        {
            frmAddNewAddress frm = new frmAddNewAddress();

            frm.Show();
        }