Пример #1
0
        private void ParametrosCamposNoClavePorComas(CSourceWriter sw)
        {
            bool Primero = true;

            foreach (CFieldM f in this.lFieldData)
            {
                sw.WriteComma(ref Primero);
                sw.Write(SUtilBD.Param(f.Name));
            }
        }
Пример #2
0
        private void ParametrosCamposNoIdPorComas(CSourceWriter sw)
        {
            bool Primero = true;

            foreach (CFieldM f in this.lFieldAll)
            {
                if (!f.IsIdentity)
                {
                    sw.WriteComma(ref Primero);
                    sw.Write(SUtilBD.Param(f.Name));
                }
            }
        }
Пример #3
0
        private void GeneraDelete(CSourceWriter sw)
        {
            sw.Write("delete from ");
            sw.Write(this.Name);
            sw.Write(" where ");
            bool Primero = true;

            foreach (CFieldM f in this.lFieldPk)
            {
                sw.WriteAnd(ref Primero);
                sw.Write(f.Name);
                sw.Write(" = ");
                sw.Write(SUtilBD.Param(f.Name));
            }
        }
Пример #4
0
        private void GeneraUpdate(CSourceWriter sw)
        {
            sw.Write("update ");
            sw.Write(this.Name);
            sw.Write(" set ");
            bool Primero = true;

            foreach (CFieldM f in this.lFieldData)
            {
                sw.WriteComma(ref Primero);
                sw.Write(f.Name);
                sw.Write(" = ");
                sw.Write(SUtilBD.Param(f.Name));
            }
            sw.Write(" where ");
            Primero = true;
            foreach (CFieldM f in this.lFieldPk)
            {
                sw.WriteComma(ref Primero);
                sw.Write(f.Name);
                sw.Write(" = ");
                sw.Write(SUtilBD.Param(f.Name));
            }
        }