Example #1
0
        private void CancButton_Click(object sender, EventArgs e)
        {
            if (IsCubicleOnEdit)
            {
                ResetButton.Visible = false;
                SaveButton.Visible  = false;
                CancButton.Visible  = false;
                IsCubicleOnEdit     = false;


                //ArrowKeys used to resize the cubicle
                UPArrow.Visible    = false;
                LeftArrow.Visible  = false;
                resetSize.Visible  = false;
                RightArrow.Visible = false;
                DownArrow.Visible  = false;

                for (int i = 0; i < 6; i++)
                {
                    l[i].Visible = false;
                    l[i].Dispose();
                }

                C_Name.Dispose();
                CubNo.Dispose();
                EmpName.Dispose();
                EmpSno.Dispose();
                C_State.Dispose();
                Other.Dispose();

                S = -1;
            }
            else if (IsResourceOnEdit)
            {
                IsResourceOnEdit    = false;
                ResetButton.Visible = false;
                SaveButton.Visible  = false;
                CancButton.Visible  = false;

                for (int i = 0; i < 7; i++)
                {
                    l[i].Visible = false;
                    l[i].Dispose();
                }

                AssEmpNo.Dispose();
                AssCubNo.Dispose();
                ResNo.Dispose();
                ResType.Dispose();
                ResState.Dispose();
                DateOfIssue.Dispose();
                OtherInfo.Dispose();

                P = -1;
            }
        }
Example #2
0
        private void ClearMyAccessPanel()
        {
            IsResourceOnEdit    = false;
            ResetButton.Visible = false;
            SaveButton.Visible  = false;
            CancButton.Visible  = false;

            for (int i = 0; i < 7; i++)
            {
                l[i].Visible = false;
                l[i].Dispose();
            }

            AssEmpNo.Dispose();
            AssCubNo.Dispose();
            ResNo.Dispose();
            ResType.Dispose();
            ResState.Dispose();
            DateOfIssue.Dispose();
            OtherInfo.Dispose();

            P = -1;
        }