private DbUpdateStatement GetQuery_UpdateQuery(SaleLine _obj)
        {
            DbUpdateStatement clause = DbMgr.CreateUpdateClause();

            clause
            .UpdateColumns(GetFields(_obj))
            .From("SaleLines")
            .Criteria
            .IsEqual("SaleLines", "SaleLineID", _obj.SaleLineID);
            return(clause);
        }
Esempio n. 2
0
        public virtual DbUpdateStatement CreateUpdateClause(string table, Dictionary <string, DbFieldEntry> fields, string fieldname, string fieldvalue)
        {
            DbUpdateStatement clause = CreateUpdateClause();

            clause
            .UpdateColumns(fields)
            .From(table)
            .Criteria
            .IsEqual(table, fieldname, fieldvalue);
            return(clause);
        }
        private DbUpdateStatement GetQuery_UpdateQuery(Currency _obj)
        {
            DbUpdateStatement clause = DbMgr.CreateUpdateClause();

            clause
            .UpdateColumns(GetFields(_obj))
            .From("Currency")
            .Criteria.IsEqual("Currency", "CurrencyID", _obj.CurrencyID);

            return(clause);
        }
Esempio n. 4
0
        public virtual DbUpdateStatement CreateUpdateClause(string table, Dictionary <string, DbFieldEntry> fields, string fieldname, int?fieldvalue)
        {
            if (fieldvalue == null)
            {
                StringBuilder sb = new StringBuilder();
                foreach (string key in fields.Keys)
                {
                    sb.AppendFormat("\r\n{0}: {1}", key, fields[key]);
                }
                throw new NullReferenceException(string.Format("{0} cannot be null before update:\r\n{1}", fieldname, sb.ToString()));
            }
            DbUpdateStatement clause = CreateUpdateClause();

            clause
            .UpdateColumns(fields)
            .From(table)
            .Criteria
            .IsEqual(table, fieldname, fieldvalue);
            return(clause);
        }