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

            switch (fAction)
            {
            case ListOption.active:

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

                break;

            case ListOption.notactive:

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

                break;

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

            default:
                LoadData(CCash_in_hand_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_in_hand_exten.PKId(pk);
                this.EnableControls(false);
                break;

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

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

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

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

            this.LoadData();
        }
Beispiel #3
0
 void txt_cash_in_hand_LookupUpdate(object sender, EventArgs e)
 {
     txt_cash_in_hand_id.LookupList = CCash_in_hand_exten.GetforLookup();
 }