public static IEnumerable<TasinirComboEntity> CreateItemsSource(ICommandAdapter cmd, int duzey, string startsWidth) { SelectSql sql = new SelectSql(); sql.Custom("SELECT Id, Adi, TasinirKodu FROM TasinirKod".ToQuery()); sql.Where(" (LEN(TasinirKodu)- LEN(REPLACE(TasinirKodu,'.',''))) = @0".ToQuery(duzey)); if (!String.IsNullOrEmpty(startsWidth)) { sql.Where("TasinirKodu", ConditionOperator.StartsWith, startsWidth); } return cmd.Query<TasinirComboEntity>(sql.ToQuery()); }
public void Set(SelectSql sql) { if (null != sql) { if (this.UcButtonEditSql1.Entity != null && this.ColumnName.Length != 0) { object value = this.UcButtonEditSql1.Value.ConvertTo(this.DataType); if (null != value) { sql.Where(this.ColumnName, this.Operator, value); } } } }
public void Set(SelectSql sql) { if (null != sql) { if (this.txt.Value.HasValue && this.ColumnName.Length != 0) { object value = this.txt.Value.ToString().ConvertTo(this.DataType); if (null != value) { sql.Where(this.ColumnName, this.Operator, value); } } } }
public void Set(SelectSql sql) { if (null != sql) { if (this.ColumnName.Length != 0) { DateTime? d1 = this.txtDate1.SelectedDate; DateTime? d2 = this.txtDate2.SelectedDate; if (d1.HasValue && d2.HasValue) { sql.Where(this.ColumnName, this.Operator, d1.Value, d2.Value); } } } }
public void Set(SelectSql sql) { if (null != sql) { if (this.Text.Length != 0 && (this.TableName.Length != 0 && this.ColumnName.Length != 0)) { sql.Where(this.TableName, this.ColumnName, this.Operator, base.Text); } } }
public void Set(SelectSql sql) { if (null != sql) { if (!this.Value.IsNull() && (this.TableName.Length != 0 && this.ColumnName.Length != 0)) { sql.Where(this.TableName, this.ColumnName, this.Operator, this.Value); } } }
public void Set(SelectSql sql) { if (null != sql) { if (this.cbx.SelectedValue.Length != 0 && this.ColumnName.Length != 0) { object value = this.cbx.Value.ConvertTo(this.DataType); if (null != value) { sql.Where(this.ColumnName, this.Operator, value); } } } }
public void Set(SelectSql sql) { if (null != sql) { if (this.cbx.CheckedItems.Any() && this.ColumnName.Length != 0) { object value = this.cbx.Value.ConvertTo(this.DataType); if (null != value) { List<object> selected = new List<object>(); foreach(var item in this.cbx.CheckedItems) { selected.Add(int.Parse(item.Value)); } sql.Where(this.ColumnName, this.Operator, selected.ToArray()); } } } }
public void Set(SelectSql sql) { if (null != sql) { DateTime? value = base.SelectedDate; if (value.HasValue && (this.TableName.Length != 0 && this.ColumnName.Length != 0)) { sql.Where(this.TableName, this.ColumnName, this.Operator, value.Value); } } }