Exemplo n.º 1
0
        public bool Delete(string DeptCode)
        {
            bool flag = false;

            using (PersistentManager persistentManager = new PersistentManager())
            {
                DepartmentDao dao = new DepartmentDao();
                dao.SetData("delete BI_DEPARTMENT WHERE DEPTCODE='" + DeptCode + "'");
                flag = true;
            }
            return(flag);
        }
Exemplo n.º 2
0
        public bool Update()
        {
            bool flag = false;

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

                string sql = string.Format("update BI_DEPARTMENT set DEPTNAME='{1}',DEPTLEADER='{2}',ISACTIVE='{3}',WARECODE='{4}',MEMO='{5}'  where DEPTCODE='{0}'"
                                           , this.DEPTCODE,
                                           this.DEPTNAME,
                                           this.DEPTLEADER,
                                           this.ISACTIVE,
                                           this.WARECODE,
                                           this.MEMO);

                dao.SetData(sql);
                flag = true;
            }
            return(flag);
        }
Exemplo n.º 3
0
        public bool Insert()
        {
            bool flag = false;

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

                string sql = string.Format("Insert into BI_DEPARTMENT (DEPTCODE,DEPTNAME,DEPTLEADER,ISACTIVE,WARECODE,MEMO) values('{0}','{1}','{2}','{3}','{4}','{5}')"
                                           , this.DEPTCODE,
                                           this.DEPTNAME,
                                           this.DEPTLEADER,
                                           this.ISACTIVE,
                                           this.WARECODE,
                                           this.MEMO);

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