Exemplo n.º 1
0
        private void btnListPriceCode_Click(object sender, EventArgs e)
        {
            StpriDialog stpri = new StpriDialog(this.main_form);

            stpri.ShowDialog();
            this.dealer_dialog.stpris = stpri.LoadStpriFromServer();
            this.cbPriceCode.AddItem <StpriVM>(this.dealer_dialog.stpris, true);
            this.cbPriceCode.Text = this.cbPriceCode.Properties.Items.Cast <StpriVM>().Where(i => i.ToString().Trim() == this.cbPriceCode.Text.Trim()).Count() > 0 ? this.cbPriceCode.Text : "";
        }
Exemplo n.º 2
0
        /** Add mode no need stpri to passing;
         *  Edit mode stpri is needed **/
        public StpriAddEditDialog(StpriDialog stpri_dialog, StpriVM stpri = null)
        {
            InitializeComponent();

            this.stpri_dialog = stpri_dialog;
            this.main_form    = stpri_dialog.main_form;
            this.stpri        = stpri;
            this.form_mode    = stpri == null ? FORM_MODE.ADD : FORM_MODE.EDIT;
        }