Ejemplo n.º 1
0
        /// <summary>
        /// حذف
        /// </summary>
        /// <returns></returns>
        public bool Delete()
        {
            JDataBase       Db  = new JDataBase();
            JSuccessorTable PDT = new JSuccessorTable();

            try
            {
                //if (JPermission.CheckPermission("Meeting.JLegislation.Delete"))
                //{
                PDT.SetValueProperty(this);
                if (PDT.Delete(Db))
                {
                    return(true);
                }
                Nodes.Delete(Nodes.CurrentNode);
                return(true);
                //}
                //else
                //    return false;
            }
            catch (Exception ex)
            {
                JSystem.Except.AddException(ex);
                return(false);
            }
            finally
            {
                Db.Dispose();
            }
        }
Ejemplo n.º 2
0
 /// <summary>
 /// ویرایش
 /// </summary>
 /// <returns></returns>
 public bool Update(JDataBase Db)
 {
     try
     {
         JSuccessorTable PDT = new JSuccessorTable();
         //if (JPermission.CheckPermission("Meeting.JLegislation.Update"))
         //{
         PDT.SetValueProperty(this);
         if (PDT.Update(Db))
         {
             //Nodes.Refreshdata(Nodes.CurrentNode, JLegislations.GetDataTable(Code).Rows[0]);
             return(true);
         }
         return(false);
         //}
         //else
         //    return false;
     }
     catch (Exception ex)
     {
         JSystem.Except.AddException(ex);
         return(false);
     }
     finally
     {
         Db.Dispose();
     }
 }
Ejemplo n.º 3
0
        /// <summary>
        /// درج
        /// </summary>
        /// <returns></returns>
        public int Insert()
        {
            JDataBase Db = new JDataBase();

            try
            {
                //if (JPermission.CheckPermission("Meeting.JLegislation.Insert"))
                //{
                JSuccessorTable JLT = new JSuccessorTable();
                JLT.SetValueProperty(this);
                Code = JLT.Insert(Db);
                if (Code > 0)
                {
                    //Nodes.DataTable.Merge(JCommissions.GetDataTable(Code));
                    return(Code);
                }
                return(0);
                //}
                //else
                //    return 0;
            }
            catch (Exception ex)
            {
                JSystem.Except.AddException(ex);
                return(0);
            }
            finally
            {
                Db.Dispose();
            }
        }