Ejemplo n.º 1
0
        public FP_Shift_Management_SettingVO GetByID(int id)
        {
            FP_Shift_Management_SettingVO vo = new FP_Shift_Management_SettingVO();
            DataTable dt = Select("ID=" + id + "");

            if (dt.Rows.Count > 0)
            {
                vo = b.ConvertObj(dt.Rows[0], new FP_Shift_Management_SettingVO()) as FP_Shift_Management_SettingVO;
            }
            return(vo);
        }
        public int Create(FP_Shift_Management_SettingVO vo)
        {
            int id;

            if (!dao.isExist(vo.Id.ToString()))
            {
                id = dao.Insert(vo);
            }
            else
            {
                id = dao.Update(vo);
            }
            return(id);
        }
Ejemplo n.º 3
0
        public int Insert(FP_Shift_Management_SettingVO vo)
        {
            int lastInsertId = 0;

            try
            {
                lastInsertId = b.Insert("FP_Shift_Management_Setting", b.ConvertColName(vo), b.ConvertValueList(vo));
            }
            catch (Exception ex)
            {
                throw ex;
            }
            return(lastInsertId);
        }
Ejemplo n.º 4
0
        public int Update(FP_Shift_Management_SettingVO vo)
        {
            int shiftID = 0;

            try
            {
                b.Update("FP_Shift_Management_Setting", vo.Id.ToString(), b.ConvertColName(vo), b.ConvertValueList(vo));
                shiftID = vo.Id;
            }
            catch (Exception ex)
            {
                throw ex;
            }
            return(shiftID);
        }