Beispiel #1
0
        public bool Update()
        {
            jWorkFlowTable WT = new jWorkFlowTable();

            WT.SetValueProperty(this);
            return(WT.Update());
        }
Beispiel #2
0
        public int Insert()
        {
            jWorkFlowTable WT = new jWorkFlowTable();

            WT.SetValueProperty(this);
            Code = WT.Insert();
            return(Code);
        }
Beispiel #3
0
        public bool GetData(int pCode, string pClassName, int pDynamicClassCode, int Ordered = 0)
        {
            jWorkFlowTable WT  = new jWorkFlowTable();
            string         SQL = "";

            if (pCode != 0)
            {
                SQL = WT.CreateQuery(" AND Code = " + pCode.ToString());
            }
            else
            {
                SQL = WT.CreateQuery(
                    " AND ClassName = " + JDataBase.Quote(pClassName) +
                    " AND DynamicClassCode = " + JDataBase.Quote(pDynamicClassCode.ToString()) +
                    " AND Ordered = " + Ordered);
            }

            JDataBase DB = new JDataBase();

            try
            {
                DB.setQuery(SQL);
                DataTable DT = DB.Query_DataTable();
                if (DT.Rows.Count > 0)
                {
                    jWorkFlowTable.SetToClassProperty(this, DT.Rows[0]);
                }
                return(true);
            }
            catch (Exception ex)
            {
                //JSystem.Except.AddException(ex);
                return(false);
            }
            finally
            {
                DB.Dispose();
            }
        }