Exemple #1
0
 /// <summary>
 /// Update a ConveyanceMethod.
 /// </summary>
 public void Update(Model.ConveyanceMethod conveyanceMethod)
 {
     //
     // todo: add other logic here.
     //
     accessor.Update(conveyanceMethod);
 }
Exemple #2
0
 /// <summary>
 /// Insert a ConveyanceMethod.
 /// </summary>
 public void Insert(Model.ConveyanceMethod conveyanceMethod)
 {
     //
     // todo:add other logic here
     //
     accessor.Insert(conveyanceMethod);
 }
Exemple #3
0
        public bool ExistsExcept(Model.ConveyanceMethod e)
        {
            Hashtable paras = new Hashtable();

            paras.Add("newId", e.Id);
            paras.Add("oldId", Get(e.ConveyanceMethodId) == null?null:Get(e.ConveyanceMethodId).Id);
            return(sqlmapper.QueryForObject <bool>("ConveyanceMethod.existsexcept", paras));
        }
        public bool IsExists(Model.ConveyanceMethod convery)
        {
            Hashtable ht = new Hashtable();

            ht.Add("id", convery.ConveyanceMethodId);
            ht.Add("name", convery.ConveyanceMethodName);
            return(sqlmapper.QueryForObject <bool>("ConveyanceMethod.IsExistConveyanceMethod", ht));
        }
Exemple #5
0
 protected override void grid_KeyDelete()
 {
     Model.ConveyanceMethod con = this.bindingSource1.Current as Model.ConveyanceMethod;
     if (con == null)
     {
         return;
     }
     this._detail.Remove(con);
     this.conveyanceManager.Delete(con.ConveyanceMethodId);
 }
Exemple #6
0
 protected override void Delete()
 {
     if ((bindingSource1.DataSource as IList <Model.ConveyanceMethod>).Count == 0)
     {
         return;
     }
     if (MessageBox.Show(Properties.Resources.ConfirmToDelete, this.Text, MessageBoxButtons.OKCancel, MessageBoxIcon.Question) != DialogResult.OK)
     {
         return;
     }
     Model.ConveyanceMethod convert = this.bindingSource1.Current as Model.ConveyanceMethod;
     this.conveyanceManager.Delete(convert.ConveyanceMethodId);
 }
Exemple #7
0
 public void Update(Model.ConveyanceMethod e)
 {
     this.Update <Model.ConveyanceMethod>(e);
 }
Exemple #8
0
 public void Insert(Model.ConveyanceMethod e)
 {
     this.Insert <Model.ConveyanceMethod>(e);
 }
Exemple #9
0
 public bool ExistsExcept(Model.ConveyanceMethod e)
 {
     return(accessor.ExistsExcept(e));
 }