コード例 #1
0
        private object[] UpdateMaster(EFeriado entity)
        {
            IDOUpdate objDO = new MGDOMnt.Feriado();

             if (entity.EntityState == EntityState.Unchanged)
            return null;

             object[] objRet = null;

             switch (entity.EntityState)
             {

            case EntityState.Added:
               objRet = objDO.Insert(entity);
               break;

            case EntityState.Modified:
               if (entity.StAnulado == ConstFlagEstado.DESACTIVADO)
                  objDO.Update(entity);
               else
                  objDO.Delete(entity);
               break;

            case EntityState.Deleted:
               objDO.Delete(entity);
               break;

             }

             return objRet;
        }
コード例 #2
0
        private ArrayList BuildParamInterface(EFeriado value)
        {
            ArrayList arrPrm = new ArrayList();

             arrPrm.Add(DataHelper.CreateParameter("@pidPeriodo", SqlDbType.Char, 4, value.IdPeriodo));
             arrPrm.Add(DataHelper.CreateParameter("@pfeFeriado", SqlDbType.DateTime, value.FeFeriado));

             return arrPrm;
        }
コード例 #3
0
        private void DeleteMaster(EFeriado entity)
        {
            IDOUpdate objDO = new MGDOMnt.Feriado();

             if (entity.EntityState == EntityState.Unchanged)
            return;

             objDO.Delete(entity);
        }