コード例 #1
0
ファイル: VMethod.cs プロジェクト: CODEXSUN/codexdotnet
 public void SetAction(BtnEvent pAction, string pPkValue)
 {
     fAction = pAction;
    
     switch (fAction)
     {
         case BtnEvent.Open:
             btn_save.Text = "&CLOSE";
             obj = CMethod_exten.PKId(pPkValue, new DAL());
             this.EnableControls(false);
             break;
         case BtnEvent.New:
             btn_save.Text = "&SAVE";
             obj = CMethod.GetNew;
             this.EnableControls(true);
             break;
         case BtnEvent.Edit:
             btn_save.Text = "&UPDATE";
             obj = CMethod_exten.PKId(pPkValue, new DAL());
             this.EnableControls(true);
             break;
         case BtnEvent.Delete:
             btn_save.Text = "CONFIRM\r\n&DELETE";
             obj = CMethod_exten.PKId(pPkValue, new DAL());
             this.EnableControls(false);
             break;
         case BtnEvent.Print:
             btn_save.Text = "&PRINT";
             obj = CMethod_exten.PKId(pPkValue, new DAL());
             this.EnableControls(false);
             break;
     }
    
     this.LoadData();
 }
コード例 #2
0
ファイル: VLMethod.cs プロジェクト: CODEXSUN/codexdotnet
        public void List_Option(ListOption pAction)
        {
            fAction = pAction;

            switch (fAction)
            {
            case ListOption.active:

                if (chk_notactive.Checked == true)
                {
                    LoadData(CMethod_exten.NotActive(new DAL()));
                }
                else
                {
                    LoadData(CMethod_exten.Active(new DAL()));
                }

                break;

            case ListOption.notactive:

                if (chk_notactive.Checked == true)
                {
                    LoadData(CMethod_exten.NotActive(new DAL()));
                }
                else
                {
                    LoadData(CMethod_exten.Active(new DAL()));
                }

                break;

            case ListOption.Search:
                if (txt_method_name.Text != "")
                {
                    List <Method> list = new List <Method>
                    {
                        CMethod_exten.SearchName(txt_method_name.Text, new DAL())
                    };
                    LoadData(list);
                }
                else
                {
                    LoadData(CMethod_exten.Active(new DAL()));
                }
                break;

            default:
                LoadData(CMethod_exten.Active(new DAL()));
                break;
            }
        }
コード例 #3
0
        private Vouchertype CollectData()
        {
            Vouchertype fobj = new Vouchertype()
            {
                Vouchertype_id   = vId,
                Vouchertype_name = txt_vouchertype_name.Text,
                Method_id        = CMethod_exten.GetId_Name(txt_method_id.Text),
                Active_id        = Core.Stative,
                Notes            = txt_notes.Text,
                User_id          = Current.User
            };

            return(fobj);
        }
コード例 #4
0
ファイル: LMethod.cs プロジェクト: CODEXSUN/codexdotnet
 void txt_method_LookupUpdate(object sender, EventArgs e)
 {
     txt_method_name.LookupList = CMethod_exten.GetforLookup(new DAL());
 }