Пример #1
0
        /// <summary>
        /// درج
        /// </summary>
        /// <returns></returns>
        public int Insert(JDataBase Db)
        {
            JWeightTable JLT = new JWeightTable();

            try
            {
                JLT.SetValueProperty(this);
                Code = JLT.Insert(Db);
                if (Code > 0)
                {
                    Db.setQuery(" Update BascoolCounter Set Counter=Counter+1 ");
                    Db.Query_Execute();
                    Nodes.DataTable.Merge(JWeights.GetDataTable(Code));
                    return(Code);
                }
                return(0);
            }
            catch (Exception ex)
            {
                JSystem.Except.AddException(ex);
                return(0);
            }
            finally
            {
                JLT.Dispose();
            }
        }
Пример #2
0
 /// <summary>
 /// حذف
 /// </summary>
 /// <returns></returns>
 public bool DeleteTransfer(int pCode, JDataBase Db)
 {
     try
     {
         JWeightTable JLT = new JWeightTable();
         JLT.Code = pCode;
         if (JLT.Delete(Db))
         {
             return(true);
         }
         return(false);
     }
     catch (Exception ex)
     {
         JSystem.Except.AddException(ex);
         return(false);
     }
     finally
     {
     }
 }
Пример #3
0
 /// <summary>
 /// ویرایش
 /// </summary>
 /// <returns></returns>
 public bool Update(JDataBase db)
 {
     try
     {
         JWeightTable PDT = new JWeightTable();
         PDT.SetValueProperty(this);
         PDT.Code = Code;
         if (PDT.Update(db))
         {
             //Nodes.Refreshdata(Nodes.CurrentNode, JWeights.GetDataTable(Code).Rows[0]);
             return(true);
         }
         return(false);
     }
     catch (Exception ex)
     {
         JSystem.Except.AddException(ex);
         return(false);
     }
     finally
     {
     }
 }