示例#1
0
        public bool funEdit(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);
            }
            frmEmployee frm = new frmEmployee();

            frm.Command = "Edit";
            frm.ID_TEMP = dt.Rows[currentIndex]["ID"].ToString();
            frm.funLoad();
            bool bOutput = false;

            if (frm.ShowDialog() == DialogResult.OK)
            {
                bOutput = true;
            }
            if (!frm.IsDisposed)
            {
                frm.Close();
                frm.Dispose();
            }
            return(bOutput);
        }
示例#2
0
        public bool funNew(string iConnection, string iUserName, string iOfficeSpaceId, string Database)
        {
            Connection    = iConnection;
            UserName      = iUserName;
            OfficeSpaceId = iOfficeSpaceId;
            DatabaseName  = Database;
            frmEmployee frm = new frmEmployee();

            frm.Command = "New";
            frm.funLoad();
            bool bOutput = false;

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