Exemplo n.º 1
0
        public bool editGroup(string iConnection, string iUserName, string iOfficeSpaceId, DataTable dt, int currentIndex, string Database)
        {
            Connection    = iConnection;
            UserName      = iUserName;
            OfficeSpaceId = iOfficeSpaceId;
            DatabaseName  = Database;
            if (dt.Rows.Count == 0)
            {
                return(false);
            }

            bool     bOutput = false;
            frmGroup frm     = new frmGroup();

            frm._ID        = "" + dt.Rows[currentIndex]["ID"];
            frm._GroupName = "" + dt.Rows[currentIndex]["GROUP_NAME"];
            frm._Command   = "Edit";
            frm.fnLoad();
            if (frm.ShowDialog() == DialogResult.OK)
            {
                bOutput = true;
            }
            if (!frm.IsDisposed)
            {
                frm.Close();
                frm.Dispose();
            }
            return(bOutput);
        }
Exemplo n.º 2
0
        public bool newGroup(string iConnection, string iUserName, string iOfficeSpaceId, string Database)
        {
            Connection    = iConnection;
            UserName      = iUserName;
            OfficeSpaceId = iOfficeSpaceId;
            DatabaseName  = Database;

            bool     bOutput = false;
            frmGroup frm     = new frmGroup();

            frm._Command = "New";
            frm.fnLoad();
            if (frm.ShowDialog() == DialogResult.OK)
            {
                bOutput = true;
            }
            if (!frm.IsDisposed)
            {
                frm.Close();
                frm.Dispose();
            }
            return(bOutput);
        }