Пример #1
0
 protected override void MoveLast()
 {
     if (this.AtPropertyDebt == null)
     {
         this.AtPropertyDebt = this.AtPropertyDebtManager.GetLast();
     }
 }
Пример #2
0
        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));
        }
Пример #3
0
 /// <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);
 }
Пример #4
0
 protected override void MoveNext()
 {
     Model.AtPropertyDebt AtPropertyDebt = this.AtPropertyDebtManager.GetNext(this.AtPropertyDebt);
     if (AtPropertyDebt == null)
     {
         throw new InvalidOperationException(Properties.Resources.ErrorNoMoreRows);
     }
     this.AtPropertyDebt = AtPropertyDebt;
 }
Пример #5
0
 /// <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);
 }
Пример #6
0
 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);
     }
 }
Пример #7
0
        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();
                }
            }
        }
Пример #8
0
 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();
     }
 }
Пример #9
0
 protected override void AddNew()
 {
     this.AtPropertyDebt = new Model.AtPropertyDebt();
     //this.AtPropertyDebt.CustomInspectionRuleId = this.AtPropertyDebtManager.GetId();
 }
Пример #10
0
 public Model.AtPropertyDebt GetPrev(Model.AtPropertyDebt e)
 {
     return(sqlmapper.QueryForObject <Model.AtPropertyDebt>("AtPropertyDebt.get_prev", e));
 }
Пример #11
0
 public Model.AtPropertyDebt GetNext(Model.AtPropertyDebt e)
 {
     return(sqlmapper.QueryForObject <Model.AtPropertyDebt>("AtPropertyDebt.get_next", e));
 }
Пример #12
0
 public bool HasRowsBefore(Model.AtPropertyDebt e)
 {
     return(accessor.HasRowsBefore(e));
 }
Пример #13
0
 public EditForm(Model.AtPropertyDebt AtPropertyDebt, string action)
     : this()
 {
     this.AtPropertyDebt = AtPropertyDebt;
     this.action         = action;
 }
Пример #14
0
 public Model.AtPropertyDebt GetNext(Model.AtPropertyDebt e)
 {
     return(accessor.GetNext(e));
 }
Пример #15
0
 public bool HasRowsAfter(Model.AtPropertyDebt e)
 {
     return(accessor.HasRowsAfter(e));
 }
Пример #16
0
 protected override void MoveFirst()
 {
     this.AtPropertyDebt = this.AtPropertyDebtManager.GetFirst();
 }
Пример #17
0
 public void Insert(Model.AtPropertyDebt e)
 {
     this.Insert <Model.AtPropertyDebt>(e);
 }
Пример #18
0
        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();
        }
Пример #19
0
 public void Update(Model.AtPropertyDebt e)
 {
     this.Update <Model.AtPropertyDebt>(e);
 }
Пример #20
0
 public EditForm(Model.AtPropertyDebt AtPropertyDebt)
     : this()
 {
     this.AtPropertyDebt = AtPropertyDebt;
     this.action         = "update";
 }
Пример #21
0
 public bool HasRowsBefore(Model.AtPropertyDebt e)
 {
     return(sqlmapper.QueryForObject <bool>("AtPropertyDebt.has_rows_before", e));
 }
Пример #22
0
 public bool HasRowsAfter(Model.AtPropertyDebt e)
 {
     return(sqlmapper.QueryForObject <bool>("AtPropertyDebt.has_rows_after", e));
 }
Пример #23
0
 public bool ExistsExcept(Model.AtPropertyDebt e)
 {
     return(accessor.ExistsExcept(e));
 }