public FPManualSettingVO GetByID(int id)
        {
            FPManualSettingVO vo = new FPManualSettingVO();
            DataTable         dt = Select("ID=" + id + "");

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

            try
            {
                lastInsertId = b.Insert("FP_ManualSetting", b.ConvertColName(vo), b.ConvertValueList(vo));
            }
            catch (Exception ex)
            {
                throw ex;
            }
            return(lastInsertId);
        }
示例#3
0
        public int Create(FPManualSettingVO vo)
        {
            int id;

            if (!dao.isExist(vo.Id.ToString()))
            {
                id = dao.Insert(vo);
            }
            else
            {
                id = dao.Update(vo);
            }
            return(id);
        }
        public int Update(FPManualSettingVO vo)
        {
            int stockInInfoID = 0;

            try
            {
                b.Update("FP_ManualSetting", vo.Id.ToString(), b.ConvertColName(vo), b.ConvertValueList(vo));
                stockInInfoID = vo.Id;
            }
            catch (Exception ex)
            {
                throw ex;
            }
            return(stockInInfoID);
        }
        public int UpdateByAtt(FPManualSettingVO vo)
        {
            int ID = 0;

            try
            {
                b.UpdateByConditon("FP_ManualSetting", "AttendanceID=" + vo.AttendanceID + " AND EMPID='" + vo.EmpID + "'", b.ConvertColName(vo), b.ConvertValueList(vo));

                ID = vo.Id;
            }
            catch (Exception ex)
            {
                throw ex;
            }
            return(ID);
        }
示例#6
0
        public int CreateByAtt(FPManualSettingVO vo)
        {
            int id;

            //if (!dao.isExistDateNid(" ManualInDate='" + vo.ManualInDate + "' AND ManualOutDate='" + vo.ManualOutDate + "' AND EMPID='" + vo.EmpID + "'"))
            //{
            //    id = dao.Insert(vo);
            //}
            if (!dao.isExistDateNid("AttendanceID=" + vo.AttendanceID))
            {
                id = dao.Insert(vo);
            }
            else
            {
                id = dao.UpdateByAtt(vo);
            }
            return(id);
        }