예제 #1
0
        private void DeleteDetail(EVarCalc entity, bool filterModified)
        {
            if (entity == null)
            return;

             IDOUpdate objDO = new RHDOMnt.VarCalcDet();
             EVarCalcDet objE = new EVarCalcDet();
             objE.IdVarCalc = entity.IdVarCalc;
             objDO.Delete(objE);
        }
예제 #2
0
        private ArrayList BuildParamInterface(EVarCalc value)
        {
            ArrayList arrPrm = new ArrayList();

             arrPrm.Add(DataHelper.CreateParameter("@pidVarCalc", SqlDbType.VarChar, 15, value.IdVarCalc));

             return arrPrm;
        }
예제 #3
0
        private void DeleteMaster(EVarCalc entity)
        {
            IDOUpdate objDO = new RHDOMnt.VarCalc();

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

             objDO.Delete(entity);
        }
예제 #4
0
        private object[] UpdateMaster(EVarCalc entity)
        {
            IDOUpdate objDO = new RHDOMnt.VarCalc();

             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;
        }
예제 #5
0
        private ArrayList BuildParamInterface(EVarCalc value)
        {
            ArrayList arrPrm = new ArrayList();

             arrPrm.Add(DataHelper.CreateParameter("@pidVarCalc", SqlDbType.VarChar, 15, value.IdVarCalc));
             arrPrm.Add(DataHelper.CreateParameter("@pdsVarCalc", SqlDbType.VarChar, 25, value.DsVarCalc));
             arrPrm.Add(DataHelper.CreateParameter("@pidTipo", SqlDbType.Char, 2, value.IdTipo));
             arrPrm.Add(DataHelper.CreateParameter("@pdsCondicion", SqlDbType.VarChar, 50, value.DsCondicion));
             arrPrm.Add(DataHelper.CreateParameter("@pidTabla", SqlDbType.Char, 3, value.IdTabla));
             arrPrm.Add(DataHelper.CreateParameter("@pidAcumula", SqlDbType.Char, 3, value.IdAcumula));
             arrPrm.Add(DataHelper.CreateParameter("@pidColumn", SqlDbType.Char, 3, value.IdColumn));
             arrPrm.Add(DataHelper.CreateParameter("@pstCondic1", SqlDbType.Char, 1, value.StCondic1));
             arrPrm.Add(DataHelper.CreateParameter("@pdsCondic1", SqlDbType.VarChar, 250, value.DsCondic1));
             arrPrm.Add(DataHelper.CreateParameter("@pnuValor1", SqlDbType.Decimal, value.NuValor1));
             arrPrm.Add(DataHelper.CreateParameter("@pstCondic2", SqlDbType.Char, 1, value.StCondic2));
             arrPrm.Add(DataHelper.CreateParameter("@pdsCondic2", SqlDbType.VarChar, 250, value.DsCondic2));
             arrPrm.Add(DataHelper.CreateParameter("@pnuValor2", SqlDbType.Decimal, value.NuValor2));
             arrPrm.Add(DataHelper.CreateParameter("@pstRegSis", SqlDbType.Char, 1, value.StRegSis));
             arrPrm.Add(DataHelper.CreateParameter("@pstAnulado", SqlDbType.Char, 1, value.StAnulado));

             return arrPrm;
        }