public DataSet Select() { Command = CommandBuilder(@"select L.id, L.name, L.contact, L.contactPerson, L.email, L.password, h.name as head, L.description, L.address, ct.name as city, cn.name as country, l2.name as employee, L.createDate from Ledger as L left join Head as h on L.headId = h.id left join ledger as l2 on l.employeeId = l2.id left join City as ct on L.cityid = ct.id left join country as cn on ct.countryId = cn.id where l.id>0"); if (!string.IsNullOrEmpty(Search)) { Command.CommandText += " and (l.name like @search or l.contact like @search or l.contactPerson like @search or l.email like @search or l.description like @search or l.address like @search)"; Command.Parameters.AddWithValue("@search", "%" + Search + "%"); } if (HeadId > 0) { Command.CommandText += " and (h.id like @head)"; Command.Parameters.AddWithValue("@head", "%" + HeadId + "%"); } if (DateSearch) { Command.CommandText += " and l.createDate between @date1 and @Date2"; Command.Parameters.AddWithValue("@date1", DateFrom.ToShortDateString()); Command.Parameters.AddWithValue("@date2", DateTo.ToShortDateString()); } return(ExecuteDS(Command)); }
public DataSet Select() { Command = CommandBuilder(@"select pi.id, pi.title, pi.datetime, pi.image, p.name as product from ProductImage as pi left join Product as p on pi.productId=p.id where pi.id>0"); if (!string.IsNullOrEmpty(Title)) { Command.CommandText += " and pi.title like @title"; Command.Parameters.AddWithValue("@title", "%" + Title + "%"); } if (ProductId > 0) { Command.CommandText += " and p.id like @product"; Command.Parameters.AddWithValue("@product", ProductId); } if (DateSearch) { Command.CommandText += " and pi.datetime between @date1 and @Date2"; Command.Parameters.AddWithValue("@date1", DateFrom.ToShortDateString()); Command.Parameters.AddWithValue("@date2", DateTo.ToShortDateString()); } return(ExecuteDS(Command)); }
public override string ToString() => $"{Car.Display} // {Customer.Display} // {DateFrom.ToShortDateString()} - {DateTo.ToShortDateString()} // Cena: {Price.ToString()}";
public override string ToString() { return(SeriesNumber + "; " + DateFrom.ToShortDateString() + "-" + DateTo.ToShortDateString()); }
public override string ToString() { return(ReservationId + ", " + User + ", " + Car.Model + ", " + Controller.HelpMethods.GetEnumDescription(Status) + ", " + DateFrom.ToShortDateString() + " -- " + DateTo.ToShortDateString()); }
public override string ToString() { return($"{LocationFrom} - {LocationTo}, {DateFrom.ToShortDateString()}-{DateTo.ToShortDateString()}, {Price}"); }
private string GetFilterSummary(string rangeString = null) { var range = rangeString == null ? $"{DateFrom.ToShortDateString()} - {DateTo.ToShortDateString()}" : rangeString; return($"{HunterName}, {range}"); }
public override string ToString() { return($"{Car.ToString()} | {DateFrom.ToShortDateString()} - {DateTo.ToShortDateString()}"); }