예제 #1
0
        public virtual bool Add(T gparam_0)
        {
            bool result;

            if (gparam_0 == null)
            {
                result = false;
            }
            else
            {
                try
                {
                    XElement xelement = XElementHelper.ToXElement <T>(gparam_0);
                    int.Parse(xelement.Element(GClass0.smethod_0("KŅ")).Value);
                    this.XDB.Add(xelement);
                    this.m_XDB.Save(this.m_DBFileName);
                    result = true;
                }
                catch
                {
                    result = false;
                }
            }
            return(result);
        }
예제 #2
0
        public virtual bool Update(T gparam_0)
        {
            bool result;

            if (gparam_0 == null)
            {
                result = false;
            }
            else
            {
                XElement xelement = XElementHelper.ToXElement <T>(gparam_0);
                int      int_     = int.Parse(xelement.Element(GClass0.smethod_0("KŅ")).Value);
                this.Delete(int_);
                result = this.Add(gparam_0);
            }
            return(result);
        }