Esempio n. 1
0
        public bool Insert()
        {
            bool flag = false;

            using (PersistentManager persistentManager = new PersistentManager())
            {
                UnitDao dao = new UnitDao();

                string sql = string.Format("Insert into WMS_UNIT (UNITCODE,UNITNAME,ISDEFAULT,ISACTIVE,STANDARDRATE,MEMO) values('{0}','{1}','{2}','{3}','{4}','{5}')"
                                           , this.UNITCODE,
                                           this.UNITNAME,
                                           this.ISDEFAULT,
                                           this.ISACTIVE,
                                           this.STANDARDRATE,
                                           this.MEMO);

                dao.SetData(sql);
                flag = true;
            }
            return(flag);
        }
Esempio n. 2
0
        public bool Update()
        {
            bool flag = false;

            using (PersistentManager persistentManager = new PersistentManager())
            {
                UnitDao dao = new UnitDao();

                string sql = string.Format("update WMS_UNIT set UNITCODE='{1}',UNITNAME='{2}',ISDEFAULT='{3}',ISACTIVE='{4}',STANDARDRATE='{5}',MEMO='{6}'  where ID='{0}'"
                                           , this.ID,
                                           this.UNITCODE,
                                           this.UNITNAME,
                                           this.ISDEFAULT,
                                           this.ISACTIVE,
                                           this.STANDARDRATE,
                                           this.MEMO);

                dao.SetData(sql);
                flag = true;
            }
            return(flag);
        }