Ejemplo n.º 1
0
        public void List_Option(ListOption pAction)
        {
            fAction = pAction;

            switch (fAction)
            {
            //case ListOption.refer:

            //    if (rdo_refer.Checked == true)
            //    {
            //        LoadData(CReceipt_exten.Refer(new DAL()));
            //    }
            //    else
            //    {
            //        LoadData(CReceipt_exten.Unrefer(new DAL()));
            //    }

            //    break;

            case ListOption.showall:

                if (rdo_showall.Checked == true)
                {
                    LoadData(CQreceipt_exten.Showall(new DAL()));
                }
                else
                {
                    LoadData(CQreceipt_exten.Unrefer(new DAL()));
                }

                break;

            case ListOption.notactive:

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

                break;

            case ListOption.Search:
                LoadData(CQreceipt_exten.Searchby(txt_no.Text, txt_date.Text, txt_party.Text, new DAL()));
                break;

            default:
                LoadData(CQreceipt_exten.Showall(new DAL()));
                break;
            }
        }
Ejemplo n.º 2
0
        public void SetAction(BtnEvent pAction, string pPkValue)
        {
            fAction = pAction;

            switch (fAction)
            {
            case BtnEvent.Open:
                btn_save.Text = "&CLOSE";
                obj           = CQreceipt_exten.PKId(pPkValue, new DAL());
                list          = CQreceiptitems_exten.FKId(pPkValue, new DAL());
                this.EnableControls(false);
                break;

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

            case BtnEvent.Edit:
                btn_save.Text = "&UPDATE";
                obj           = CQreceipt_exten.PKId(pPkValue, new DAL());
                list          = CQreceiptitems_exten.FKId(pPkValue, new DAL());
                this.EnableControls(true);
                break;

            case BtnEvent.Delete:
                btn_save.Text = "CONFIRM\r\n&DELETE";
                obj           = CQreceipt_exten.PKId(pPkValue, new DAL());
                list          = CQreceiptitems_exten.FKId(pPkValue, new DAL());
                this.EnableControls(false);
                break;

            case BtnEvent.Print:
                btn_save.Text = "&PRINT";
                obj           = CQreceipt_exten.PKId(pPkValue, new DAL());
                list          = CQreceiptitems_exten.FKId(pPkValue, new DAL());
                this.EnableControls(false);
                // print_panel.Show();
                break;
            }

            LoadData(obj);
            Loaditems(list);
        }
Ejemplo n.º 3
0
 void Txt_party_LookupUpdate(object sender, EventArgs e)
 {
     txt_party.LookupList = CQreceipt_exten.LookupParty(new DAL());
 }
Ejemplo n.º 4
0
 void Txt_date_LookupUpdate(object sender, EventArgs e)
 {
     txt_date.LookupList = CQreceipt_exten.LookupDate(new DAL());
 }
Ejemplo n.º 5
0
 void Txt_no_LookupUpdate(object sender, EventArgs e)
 {
     txt_no.LookupList = CQreceipt_exten.LookupNo(new DAL());
 }