Ejemplo n.º 1
0
        public static boj5_detail_VM ToViewModel(this boj5_detail detail)
        {
            if (detail == null)
            {
                return(null);
            }

            boj5_detail_VM b = new boj5_detail_VM
            {
                boj5_detail = detail
            };

            return(b);
        }
Ejemplo n.º 2
0
        private void btnEditItem_Click(object sender, EventArgs e)
        {
            if (this.dgv.CurrentCell == null)
            {
                return;
            }

            boj5_detail     detail = (boj5_detail)this.dgv.Rows[this.dgv.CurrentCell.RowIndex].Cells[this.col_boj5_detail.Name].Value;
            DialogBojDetail d      = new DialogBojDetail(this.main_form, detail);

            d.ShowDialog();
            this.GetBojData();
            this.FillForm(this.boj5_header, this.boj5_detail);
        }
Ejemplo n.º 3
0
        private void DialogBojDetail_Load(object sender, EventArgs e)
        {
            this.isinfo = DbfTable.GetIsinfo(this.main_form.selected_comp);

            if (this.boj5_detail == null)
            {
                this.boj5_detail = new boj5_detail
                {
                    asPaidAmount   = 0,
                    boj5_person_id = -1,
                    itemNo         = -1,
                    paidAmount     = 0,
                    shareDocDate   = null,
                    shareDocId     = string.Empty,
                    shareNumber    = 0,
                    shareRegExist  = null,
                    shareRegOmit   = null,
                    shareType      = ((int)SHARE_TYPE.COMMON_SHARE).ToString(),
                    userId         = this.isinfo.taxid
                };
            }

            this.SetDropDownItem();
            this.LoadPersonToDatagrid();
            //using (LocalDbEntities db = DBX.DataSet(this.main_form.selected_comp))
            //{
            //    this.person_list = new BindingList<boj5_person_VM>(db.boj5_person.ToList().ToViewModel());
            //    this.person_list.ToList().ForEach(i =>
            //    {
            //        if(i.boj5_person.id == this.boj5_detail.boj5_person_id)
            //        {
            //            i.selected = true;
            //        }
            //    });
            //    this.dgvPerson.DataSource = this.person_list;
            //}

            this.FillForm();
        }
Ejemplo n.º 4
0
 public DialogBojDetail(OldForm main_form, boj5_detail boj5_detail = null)
 {
     this.main_form   = main_form;
     this.boj5_detail = boj5_detail;
     InitializeComponent();
 }