private void btnEdit_Click(object sender, System.EventArgs e)
        {
            ArrayList keysArr = _gr.SelectedPrimaryKeys;

            if (keysArr == null || keysArr.Count == 0)
            {
                Session[_sessionContent]           = "List";
                Session[_sessionItemCurrentObject] = null;
            }
            else
            {
                Session[_sessionContent] = "Edit";
                FI.BusinessObjects.Contact cnt = _user.ContactSystem.GetContact(decimal.Parse(((string[])keysArr[0])[0]), true);
                Session[_sessionItemCurrentObject] = cnt;
            }

            Server.Transfer(Request.FilePath, false);
        }
        private void FIDataEdit_CancelButtonClick(object Sender, System.Web.UI.WebControls.CommandEventArgs e)
        {
            FI.BusinessObjects.Contact contact = null;

            if (Session[_sessionItemCurrentObject] != null)
            {
                contact = (FI.BusinessObjects.Contact)Session[_sessionItemCurrentObject];
            }

            if ((string)Session[_sessionContent] == "Insert")
            {
                _user.ContactSystem.DeleteContact(contact);
            }

            Session[_sessionContent]           = "List";
            Session[_sessionItemCurrentObject] = null;

            Server.Transfer(Request.FilePath, false);
        }
        private void FIDataEdit_DeleteButtonClick(object Sender, System.Web.UI.WebControls.CommandEventArgs e)
        {
            FI.UI.Web.Controls.FIDataEdit dataEdit = (FI.UI.Web.Controls.FIDataEdit)Sender;

            if (dataEdit.IsValid == false)
            {
                return;
            }

            FI.BusinessObjects.Contact contact = (FI.BusinessObjects.Contact)dataEdit.CurrentObject;

            try
            {
                _user.ContactSystem.DeleteContact(contact);
                Session[_sessionContent] = "List";

                Server.Transfer(Request.FilePath, false);
            }
            catch (System.Exception err)
            {
                _ed.ShowException(err);
            }
        }