Beispiel #1
0
        public void List_Option(ListOption pAction)
        {
            fAction = pAction;

            switch (fAction)
            {
            case ListOption.refer:

                if (rdo_refer.Checked == true)
                {
                    LoadData(CPurchase_exten.Refer());
                }
                else
                {
                    LoadData(CPurchase_exten.Unrefer());
                }

                break;

            case ListOption.showall:

                if (rdo_showall.Checked == true)
                {
                    LoadData(CPurchase_exten.Showall());
                }
                else
                {
                    LoadData(CPurchase_exten.Unrefer());
                }

                break;

            case ListOption.notactive:

                if (rdo_notactive.Checked == true)
                {
                    LoadData(CPurchase_exten.Notactive(new DAL()));
                }
                else
                {
                    LoadData(CPurchase_exten.Unrefer());
                }

                break;

            case ListOption.Search:
                LoadData(CPurchase_exten.Searchby(txt_no.Text, txt_date.Text, txt_Todate.Text, txt_party.Text));
                break;

            default:
                LoadData(CPurchase_exten.Unrefer());
                break;
            }
        }
Beispiel #2
0
        private void Btn_delete_Click(object sender, EventArgs e)
        {
            string pkValue = GetSelectedPkValue();

            if (CPurchase_exten.LockStatus(pkValue) == false)
            {
                BuildForm();
                if (pkValue != null)
                {
                    finvoice.SetAction(BtnEvent.Delete, pkValue);
                    finvoice.SetFocus();
                }
            }
        }
Beispiel #3
0
        public void SetAction(BtnEvent pAction, string pPkValue)
        {
            fAction = pAction;

            switch (fAction)
            {
            case BtnEvent.Open:
                btn_save.Text = "&CLOSE";
                obj           = CPurchase_exten.PKId(pPkValue, new DAL());

                //if (Customise.Purchase_poid_dcid == true)
                //{
                //    list = CPurchaseitems_exten.FKId(pPkValue, new DAL());
                //}

                //if ((Customise.Purchase_pono_dcno == true) || (Customise.Purchase_Without_podc == true))
                //{
                list = CPurchaseitems_exten.FKNo(pPkValue, new DAL());
                //}

                this.EnableControls(false);
                break;

            case BtnEvent.New:
                btn_save.Text = "&SAVE";
                obj           = CPurchase.GetNew;
                list          = CPurchaseitems.GetNew;
                this.EnableControls(true);
                break;

            case BtnEvent.Edit:
                btn_save.Text = "&UPDATE";
                obj           = CPurchase_exten.PKId(pPkValue, new DAL());

                //if (Customise.Purchase_poid_dcid == true)
                //{
                //    list = CPurchaseitems_exten.FKId(pPkValue, new DAL());
                //}

                //if ((Customise.Purchase_pono_dcno == true) || (Customise.Purchase_Without_podc == true))
                //{
                list = CPurchaseitems_exten.FKNo(pPkValue, new DAL());
                //}

                this.EnableControls(true);
                break;

            case BtnEvent.Delete:
                btn_save.Text = "CONFIRM\r\n&DELETE";
                obj           = CPurchase_exten.PKId(pPkValue, new DAL());

                //if (Customise.Purchase_poid_dcid == true)
                //{
                //    list = CPurchaseitems_exten.FKId(pPkValue, new DAL());
                //}

                //if ((Customise.Purchase_pono_dcno == true) || (Customise.Purchase_Without_podc == true))
                //{
                list = CPurchaseitems_exten.FKNo(pPkValue, new DAL());
                //}

                this.EnableControls(false);
                break;

            case BtnEvent.Print:
                btn_save.Text = "&PRINT";
                obj           = CPurchase_exten.PKId(pPkValue, new DAL());

                //if (Customise.Purchase_poid_dcid == true)
                //{
                //    list = CPurchaseitems_exten.FKId(pPkValue, new DAL());
                //}

                //if ((Customise.Purchase_pono_dcno == true) || (Customise.Purchase_Without_podc == true))
                //{
                list = CPurchaseitems_exten.FKNo(pPkValue, new DAL());
                //}

                this.EnableControls(false);
                print_panel.Show();
                break;
            }

            LoadData(obj);
            Loaditems(list);
        }
Beispiel #4
0
 void Txt_no_LookupUpdate(object sender, EventArgs e)
 {
     txt_no.LookupList = CPurchase_exten.LookupNo(new DAL());
 }