protected override void MoveLast() { if (this.AtPropertyDebt == null) { this.AtPropertyDebt = this.AtPropertyDebtManager.GetLast(); } }
public bool ExistsExcept(Model.AtPropertyDebt e) { Hashtable paras = new Hashtable(); paras.Add("newId", e.Id); paras.Add("oldId", Get(e.PropertyDebtId) == null?null:Get(e.PropertyDebtId).Id); return(sqlmapper.QueryForObject <bool>("AtPropertyDebt.existsexcept", paras)); }
/// <summary> /// Update a AtPropertyDebt. /// </summary> public void Update(Model.AtPropertyDebt atPropertyDebt) { // // todo: add other logic here. // Validate(atPropertyDebt); atPropertyDebt.UpdateTime = DateTime.Now; accessor.Update(atPropertyDebt); }
protected override void MoveNext() { Model.AtPropertyDebt AtPropertyDebt = this.AtPropertyDebtManager.GetNext(this.AtPropertyDebt); if (AtPropertyDebt == null) { throw new InvalidOperationException(Properties.Resources.ErrorNoMoreRows); } this.AtPropertyDebt = AtPropertyDebt; }
/// <summary> /// Insert a AtPropertyDebt. /// </summary> public void Insert(Model.AtPropertyDebt atPropertyDebt) { // // todo:add other logic here // Validate(atPropertyDebt); atPropertyDebt.PropertyDebtId = Guid.NewGuid().ToString(); atPropertyDebt.InsertTime = DateTime.Now; accessor.Insert(atPropertyDebt); }
private void Validate(Model.AtPropertyDebt atPropertyDebt) { if (string.IsNullOrEmpty(atPropertyDebt.CategoryName)) { throw new Helper.RequireValueException(Model.AtPropertyDebt.PRO_CategoryName); } if (string.IsNullOrEmpty(atPropertyDebt.CategoriesName)) { throw new Helper.RequireValueException(Model.AtPropertyDebt.PRO_CategoriesName); } if (string.IsNullOrEmpty(atPropertyDebt.SubjectId)) { throw new Helper.RequireValueException(Model.AtPropertyDebt.PRO_SubjectId); } }
private void gridView1_Click(object sender, EventArgs e) { GridView view = sender as GridView; GridHitInfo hitInfo = view.CalcHitInfo(view.GridControl.PointToClient(Cursor.Position)); if (hitInfo.InRow && !view.IsGroupRow(hitInfo.RowHandle)) { Model.AtPropertyDebt productEpiboly = this.bindingSource1.Current as Model.AtPropertyDebt; if (productEpiboly != null) { this.AtPropertyDebt = productEpiboly; this.action = "view"; this.Refresh(); } } }
protected override void Delete() { if (this.AtPropertyDebt == null) { return; } if (MessageBox.Show(Properties.Resources.ConfirmToDelete, this.Text, MessageBoxButtons.OKCancel, MessageBoxIcon.Warning) != DialogResult.OK) { return; } this.AtPropertyDebtManager.Delete(this.AtPropertyDebt.PropertyDebtId); this.AtPropertyDebt = this.AtPropertyDebtManager.GetNext(this.AtPropertyDebt); if (this.AtPropertyDebt == null) { this.AtPropertyDebt = this.AtPropertyDebtManager.GetLast(); } }
protected override void AddNew() { this.AtPropertyDebt = new Model.AtPropertyDebt(); //this.AtPropertyDebt.CustomInspectionRuleId = this.AtPropertyDebtManager.GetId(); }
public Model.AtPropertyDebt GetPrev(Model.AtPropertyDebt e) { return(sqlmapper.QueryForObject <Model.AtPropertyDebt>("AtPropertyDebt.get_prev", e)); }
public Model.AtPropertyDebt GetNext(Model.AtPropertyDebt e) { return(sqlmapper.QueryForObject <Model.AtPropertyDebt>("AtPropertyDebt.get_next", e)); }
public bool HasRowsBefore(Model.AtPropertyDebt e) { return(accessor.HasRowsBefore(e)); }
public EditForm(Model.AtPropertyDebt AtPropertyDebt, string action) : this() { this.AtPropertyDebt = AtPropertyDebt; this.action = action; }
public Model.AtPropertyDebt GetNext(Model.AtPropertyDebt e) { return(accessor.GetNext(e)); }
public bool HasRowsAfter(Model.AtPropertyDebt e) { return(accessor.HasRowsAfter(e)); }
protected override void MoveFirst() { this.AtPropertyDebt = this.AtPropertyDebtManager.GetFirst(); }
public void Insert(Model.AtPropertyDebt e) { this.Insert <Model.AtPropertyDebt>(e); }
public override void Refresh() { if (this.AtPropertyDebt == null) { this.AtPropertyDebt = new Book.Model.AtPropertyDebt(); this.action = "insert"; } this.bindingSource1.DataSource = AtPropertyDebtManager.Select(); this.textEditCategoryName.Text = this.AtPropertyDebt.CategoryName; this.lookUpEdit1.Text = this.AtPropertyDebt.CategoriesName; this.newChooseContorl1.EditValue = this.AtPropertyDebt.Subject; this.spinEditAddMoney.EditValue = this.AtPropertyDebt.AddMoney; this.spinEditIsMoney.EditValue = this.AtPropertyDebt.IsMoney; if (global::Helper.DateTimeParse.DateTimeEquls(this.AtPropertyDebt.PropertyDebtDate, global::Helper.DateTimeParse.NullDate)) { this.dateEditDate.EditValue = null; } else { this.dateEditDate.EditValue = this.AtPropertyDebt.PropertyDebtDate; } switch (this.action) { case "insert": this.textEditCategoryName.Properties.ReadOnly = false; this.lookUpEdit1.Properties.ReadOnly = false; this.newChooseContorl1.ShowButton = true; this.newChooseContorl1.ButtonReadOnly = false; this.spinEditAddMoney.Properties.ReadOnly = false; this.spinEditIsMoney.Properties.ReadOnly = false; this.dateEditDate.Properties.ReadOnly = false; this.dateEditDate.Properties.Buttons[0].Visible = true; break; case "update": this.textEditCategoryName.Properties.ReadOnly = false; this.lookUpEdit1.Properties.ReadOnly = false; this.newChooseContorl1.ShowButton = true; this.newChooseContorl1.ButtonReadOnly = false; this.spinEditAddMoney.Properties.ReadOnly = false; this.spinEditIsMoney.Properties.ReadOnly = false; this.dateEditDate.Properties.ReadOnly = false; this.dateEditDate.Properties.Buttons[0].Visible = true; break; case "view": this.textEditCategoryName.Properties.ReadOnly = true; this.lookUpEdit1.Properties.ReadOnly = true; this.newChooseContorl1.ShowButton = false; this.newChooseContorl1.ButtonReadOnly = true; this.spinEditAddMoney.Properties.ReadOnly = true; this.spinEditIsMoney.Properties.ReadOnly = true; this.dateEditDate.Properties.ReadOnly = true; this.dateEditDate.Properties.Buttons[0].Visible = false; break; default: break; } base.Refresh(); }
public void Update(Model.AtPropertyDebt e) { this.Update <Model.AtPropertyDebt>(e); }
public EditForm(Model.AtPropertyDebt AtPropertyDebt) : this() { this.AtPropertyDebt = AtPropertyDebt; this.action = "update"; }
public bool HasRowsBefore(Model.AtPropertyDebt e) { return(sqlmapper.QueryForObject <bool>("AtPropertyDebt.has_rows_before", e)); }
public bool HasRowsAfter(Model.AtPropertyDebt e) { return(sqlmapper.QueryForObject <bool>("AtPropertyDebt.has_rows_after", e)); }
public bool ExistsExcept(Model.AtPropertyDebt e) { return(accessor.ExistsExcept(e)); }