Ejemplo n.º 1
0
        public F_COA_Template_Details_Added_Row()
        {
            InitializeComponent();
            Load += (s, e) =>
            {
                LoadDataIntoTable();

                if (isAction == "Edit")
                {
                    txtID.ReadOnly = true;
                    Set4Controls();
                }
                else if (isAction == "Add")
                {
                    txtID.ReadOnly = true;
                    txtCOAID.Text  = OBJ.COATemplateID.ToString();
                }
            };

            btnSave.Click += (s, e) =>
            {
                if (isAction == "Add")
                {
                    Set4Object();
                    BUS.COA_Template_DetailsDAO_INSERT(OBJ);
                }
                else if (isAction == "Edit")
                {
                    Set4Object();
                    BUS.COA_Template_DetailsDAO_UPDATE(OBJ);
                }
                Is_close = true;
            };

            btnCancel.Click += (s, e) =>
            {
                this.Close();
            };

            lkeHMKT.ButtonClick += (s, e) =>
            {
                if (e.Button.Index == 1)
                {
                    F_CTPT_Details FRM = new F_CTPT_Details();
                    FRM.isAction    = "Add";
                    FRM.myFinished += this.finished;
                    FRM.Show();
                }
            };
        }
Ejemplo n.º 2
0
        private void ItemClickEventHandler_Add(object sender, EventArgs e)
        {
            isAction = "Add";

            state = MenuState.Insert;
            //Update :  DELEGATE
            // Gọi form Details
            F_CTPT_Details F_LOC_Dtl = new F_CTPT_Details();

            F_LOC_Dtl.isAction    = this.isAction;
            F_LOC_Dtl.CTPT        = this.CTPT;
            F_LOC_Dtl.myFinished += this.finished;
            F_LOC_Dtl.Show();
        }
Ejemplo n.º 3
0
        public F_KQKN_Template_Details_Added_Row()
        {
            InitializeComponent();
            Load += (s, e) =>
            {
                //if(isEditting == true)
                if (isAction == "Edit")
                {
                    txtID.ReadOnly = true;
                    Set4Controls();
                }
                else if (isAction == "Add")
                {
                    txtID.ReadOnly         = true;
                    txtKQKNTemplateID.Text = OBJ.KQKNTemplateID.ToString();
                    txtSTT.Text            = STT.ToString();
                }
            };

            btnSave.Click += (s, e) =>
            {
                if (isAction == "Add")
                {
                    Set4Object();
                    BUS.KQKN_Template_Details_Row_INSERT(OBJ);
                }
                else if (isAction == "Edit")
                {
                    Set4Object();
                    BUS.KQKN_Template_Details_Row_UPDATE(OBJ);
                }
                Is_close = true;
            };

            btnCancel.Click += (s, e) =>
            {
                this.Close();
            };

            lkeTC.ButtonClick += (s, e) =>
            {
                if (e.Button.Index == 1)
                {
                    F_TC_Details FRM = new Class.F_TC_Details();
                    FRM.isAction    = "Add";
                    FRM.myFinished += this.finished;
                    FRM.Show();
                }
            };

            lkePPT.ButtonClick += (s, e) =>
            {
                if (e.Button.Index == 1)
                {
                    F_PPT_Details FRM = new F_PPT_Details();
                    FRM.isAction    = "Add";
                    FRM.myFinished += this.finished;
                    FRM.Show();
                }
            };

            lkeCTPT.ButtonClick += (s, e) =>
            {
                if (e.Button.Index == 1)
                {
                    F_CTPT_Details FRM = new F_CTPT_Details();
                    FRM.isAction    = "Add";
                    FRM.myFinished += this.finished;
                    FRM.Show();
                }
            };
        }