/// <summary> /// Update a PassNoteBook. /// </summary> public void Update(Model.PassNoteBook passNoteBook) { // // todo: add other logic here. // accessor.Update(passNoteBook); }
/// <summary> /// Insert a PassNoteBook. /// </summary> public void Insert(Model.PassNoteBook passNoteBook) { // // todo:add other logic here // accessor.Insert(passNoteBook); }
protected override void MovePrev() { Model.PassNoteBook model = this._manager.GetPrev(this._passNoteBook); if (model == null) { throw new InvalidOperationException(Properties.Resources.ErrorNoMoreRows); } this._passNoteBook = model; }
protected override void Delete() { if (this._passNoteBook == null) { return; } if (MessageBox.Show(Properties.Resources.ConfirmToDelete, this.Text, MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes) { Model.PassNoteBook model = this._manager.GetNext(this._passNoteBook); this._manager.Delete(this._passNoteBook.PassNoteBookId); if (model == null) { this._passNoteBook = this._manager.GetLast(); } else { this._passNoteBook = model; } MessageBox.Show(Properties.Resources.DeleteSuccess); } }
protected override void MoveLast() { this._passNoteBook = this._manager.GetLast(); }
public Model.PassNoteBook GetPrev(Model.PassNoteBook e) { return(sqlmapper.QueryForObject <Model.PassNoteBook>("PassNoteBook.get_prev", e)); }
public bool HasRowsAfter(Model.PassNoteBook e) { return(sqlmapper.QueryForObject <bool>("PassNoteBook.has_rows_after", e)); }
public bool HasRowsAfter(Model.PassNoteBook e) { return(accessor.HasRowsAfter(e)); }
public void Update(Model.PassNoteBook e) { this.Update <Model.PassNoteBook>(e); }
public bool HasRowsBefore(Model.PassNoteBook e) { return(sqlmapper.QueryForObject <bool>("PassNoteBook.has_rows_before", e)); }
public void Insert(Model.PassNoteBook e) { this.Insert <Model.PassNoteBook>(e); }
public Model.PassNoteBook GetNext(Model.PassNoteBook e) { return(accessor.GetNext(e)); }
public Model.PassNoteBook GetPrev(Model.PassNoteBook e) { return(accessor.GetPrev(e)); }
protected override void AddNew() { this._passNoteBook = new Book.Model.PassNoteBook(); this._passNoteBook.PassNoteBookId = Guid.NewGuid().ToString(); this.action = "insert"; }
public Model.PassNoteBook GetNext(Model.PassNoteBook e) { return(sqlmapper.QueryForObject <Model.PassNoteBook>("PassNoteBook.get_next", e)); }
public override void Refresh() { if (this._passNoteBook == null) { this.AddNew(); } else { if (this.action == "view") { this._passNoteBook = this._manager.Get(this._passNoteBook.PassNoteBookId); } } this.txt_CompanyInnerId.EditValue = this._passNoteBook.CompanyInnerId; this.txt_NoteBookId.EditValue = this._passNoteBook.NoteBookId; this.cobBackType.EditValue = this._passNoteBook.BackType; this.txt_JingYingDanWeiId.EditValue = this._passNoteBook.JingYingDanWeiId; this.txt_JingYingDanWeiName.EditValue = this._passNoteBook.JingYingDanWeiName; this.cobNoteBookType.EditValue = this._passNoteBook.NoteBookType; this.txt_JiaGongDanWeiId.EditValue = this._passNoteBook.JiaGongDanWeiId; this.txt_JiaGongDanWeiName.EditValue = this._passNoteBook.JiaGongDanWeiName; this.txt_ReceivingArea.EditValue = this._passNoteBook.ReceivingArea; this.txt_ReportingUnitId.EditValue = this._passNoteBook.ReportingUnitId; this.txt_ReportingUnitName.EditValue = this._passNoteBook.ReportingUnitName; this.date_ReportingDate.EditValue = this._passNoteBook.ReportingDate; this.txt_ZhengMianXingZhi.EditValue = this._passNoteBook.ZhengMianXingZhi; this.txt_AgreeNum.EditValue = this._passNoteBook.AgreeNum; this.date_EnteringDate.EditValue = this._passNoteBook.EnteringDate; this.txt_ImportContract.EditValue = this._passNoteBook.ImportContract; this.txt_ExportContract.EditValue = this._passNoteBook.ExportContract; this.txt_ZhuGuanHaiGuan.EditValue = this._passNoteBook.ZhuGuanHaiGuan; this.txt_BackImportTotalMoney.EditValue = this._passNoteBook.BackImportTotalMoney; this.txt_BackExportTotalMoney.EditValue = this._passNoteBook.BackExportTotalMoney; this.txt_ZhuGuanWaiJingMaoWei.EditValue = this._passNoteBook.ZhuGuanWaiJingMaoWei; this.lueImportAtCurrencyCategoryId.EditValue = this._passNoteBook.ImportAtCurrencyCategoryId; this.lueExportAtCurrencyCategoryId.EditValue = this._passNoteBook.ExportAtCurrencyCategoryId; this.cobXianZhiLeiMark.EditValue = this._passNoteBook.XianZhiLeiMark; this.txt_ProcessType.EditValue = this._passNoteBook.ProcessType; this.txt_BGProductId.EditValue = this._passNoteBook.BGProductId; this.cobDanSunReportingLink.EditValue = this._passNoteBook.DanSunReportingLink; this.date_EffectiveData.EditValue = this._passNoteBook.EffectiveData; this.txt_TradeType.EditValue = this._passNoteBook.TradeType; this.speImportProductNum.EditValue = this._passNoteBook.ImportProductNum; this.speImportMoney.EditValue = this._passNoteBook.ImportMoney; this.speExportProductNum.EditValue = this._passNoteBook.ExportProductNum; this.speExportMoney.EditValue = this._passNoteBook.ExportMoney; this.txt_ForeignCompany.EditValue = this._passNoteBook.ForeignCompany; this.nccEmployeeId.EditValue = this._passNoteBook.EmployeeId; this.lueImportExportShore.EditValue = this._passNoteBook.ImportExportShoreId; this.speNeiXiaoBiLi.EditValue = this._passNoteBook.NeiXiaoBiLi; this.cobManageObject.EditValue = this._passNoteBook.ManageObject; this.cobTaiZhangBank.EditValue = this._passNoteBook.TaiZhangBank; this.txt_Note.EditValue = this._passNoteBook.Note; this.newChooseContorlAuditEmp.EditValue = this._passNoteBook.AuditEmp; this.txt_AuditState.EditValue = this.GetAuditName(this._passNoteBook.AuditState); base.Refresh(); switch (this.action) { case "view": this.gridView1.OptionsBehavior.Editable = false; this.gridView2.OptionsBehavior.Editable = false; break; default: this.gridView1.OptionsBehavior.Editable = true; this.gridView2.OptionsBehavior.Editable = true; break; } }
public bool HasRowsBefore(Model.PassNoteBook e) { return(accessor.HasRowsBefore(e)); }