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

            switch (fAction)
            {
            case ListOption.active:

                if (chk_notactive.Checked == true)
                {
                    LoadData(CCash_receipt_exten.NotActive());
                }
                else
                {
                    LoadData(CCash_receipt_exten.Active());
                }

                break;

            case ListOption.notactive:

                if (chk_notactive.Checked == true)
                {
                    LoadData(CCash_receipt_exten.NotActive());
                }
                else
                {
                    LoadData(CCash_receipt_exten.Active());
                }

                break;

            case ListOption.Search:
                if (txt_receipt_date.Text != "")
                {
                    List <Cash_receipt> list = new List <Cash_receipt>
                    {
                        CCash_receipt_exten.SearchName(txt_receipt_date.Text)
                    };
                    LoadData(list);
                }
                else
                {
                    LoadData(CCash_receipt_exten.Active());
                }
                break;

            default:
                LoadData(CCash_receipt_exten.Active());
                break;
            }
        }
Beispiel #2
0
        public void SetAction(BtnEvent action, string pk)
        {
            fAction = action;

            switch (fAction)
            {
            case BtnEvent.Open:
                btn_save.Text = "&CLOSE";
                obj           = CCash_receipt_exten.PKId(pk);
                this.EnableControls(false);
                break;

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

            case BtnEvent.Edit:
                btn_save.Text = "&UPDATE";
                obj           = CCash_receipt_exten.PKId(pk);
                this.EnableControls(true);
                break;

            case BtnEvent.Delete:
                btn_save.Text = "CONFIRM\r\n&DELETE";
                obj           = CCash_receipt_exten.PKId(pk);
                this.EnableControls(false);
                break;

            case BtnEvent.Print:
                btn_save.Text = "&PRINT";
                obj           = CCash_receipt_exten.PKId(pk);
                this.EnableControls(false);
                break;
            }

            this.LoadData();
        }
Beispiel #3
0
 void txt_cash_receipt_LookupUpdate(object sender, EventArgs e)
 {
     txt_receipt_date.LookupList = CCash_receipt_exten.GetforLookup();
 }