/// <summary>Создать колонки</summary> public void CreateColumn() { var settingOneWay = new MyTools.C_Setting_DGColumn(); var Result = new List <column>(); var isReadOnly = false; Result.Add(new column(ThisColumn.Number, "Number", ThisColumn.Numbern, settingOneWay)); Result.Add(new column(ThisColumn.Company, "Company", ThisColumn.Companyn, settingOneWay)); Result.Add(new column(ThisColumn.Well, "Well", ThisColumn.Welln, settingOneWay)); Result.Add(new column(ThisColumn.Folder, "Folder", ThisColumn.Foldern, settingOneWay)); Result.Add(new column(ThisColumn.Status, "Status", ThisColumn.Statusn, settingOneWay)); Result.Add(new column(ThisColumn.DateTime, "DateTime", ThisColumn.DateTimen, settingOneWay)); Result.Add(new column(ThisColumn.Volume, "Volume", ThisColumn.Volumen, new MyTools.C_Setting_DGColumn(BindingMode.TwoWay, UpdateSourceTrigger.PropertyChanged, isReadOnly))); Result.Add(new column(ThisColumn.Summ, "Summ", ThisColumn.Summn, settingOneWay)); int now = Result.Count; { var pollutions = Helpers.LogicHelper.PollutionLogic.Find(); Result.AddRange(pollutions.Select(x => new column(x.CurtName.SymbolConverter(), $"Values[{x.Index}].Value", x.Number + now, new MyTools.C_Setting_DGColumn(BindingMode.TwoWay, IsReadOnly: isReadOnly)) { ExtraValue = "skip" })); } columns = Result.ToArray(); }
protected override void GetDGColumn() { setting = new MyTools.C_Setting_DGColumn(); List <MyTools.C_DGColumn_Bind> list = new List <MyTools.C_DGColumn_Bind>(); list.Add(new MyTools.C_DGColumn_Bind("Отбор", MyTools.E_TypeColumnDG.Text, "select", setting)); foreach (var one in pollutions) { list.Add(new MyTools.C_DGColumn_Bind(one.CurtName, MyTools.E_TypeColumnDG.Text, $"value[{one.UniqueKey}]", setting)); } ColumnsFromDG = list.ToArray(); }
protected override void GetDGColumn() { MyTools.C_Setting_DGColumn setting = new MyTools.C_Setting_DGColumn(); List <MyTools.C_DGColumn_Bind> list = new List <MyTools.C_DGColumn_Bind>(); list.Add(new MyTools.C_DGColumn_Bind(Columns.name, MyTools.E_TypeColumnDG.Text, "NameClient", setting)); //list.Add(new MyTools.C_DGColumn_Bind(col.inn, MyTools.E_TypeColumnDG.Text, "INN", setting)); list.Add(new MyTools.C_DGColumn_Bind(Columns.volume, MyTools.E_TypeColumnDG.Text, "Volume", setting)); list.Add(new MyTools.C_DGColumn_Bind("объёмы", MyTools.E_TypeColumnDG.Text, "Volumes", setting)); if (ColumnsBook.ContainsKey(Columns.volnew) || ColumnsBook.ContainsKey(Columns.volold)) { list.Add(new MyTools.C_DGColumn_Bind("тариф", MyTools.E_TypeColumnDG.Text, "Tarif", setting)); } list.Add(new MyTools.C_DGColumn_Bind(Columns.adres, MyTools.E_TypeColumnDG.Text, "Adres", setting)); list.Add(new MyTools.C_DGColumn_Bind("Номер папки", MyTools.E_TypeColumnDG.Text, "NumberFolder", setting)); list.Add(new MyTools.C_DGColumn_Bind("Адрес из БАЗЫ", MyTools.E_TypeColumnDG.Text, "AdresFromBase", setting)); ColumnsFromDG = list.ToArray(); }
protected override void GetDGColumn() { MyTools.C_Setting_DGColumn setting = new MyTools.C_Setting_DGColumn(); List <MyTools.C_DGColumn_Bind> list = new List <MyTools.C_DGColumn_Bind> { new MyTools.C_DGColumn_Bind("номер отбора", MyTools.E_TypeColumnDG.Text, "number", setting), new MyTools.C_DGColumn_Bind(col.ls, MyTools.E_TypeColumnDG.Text, "ls", setting), new MyTools.C_DGColumn_Bind(col.name, MyTools.E_TypeColumnDG.Text, "name", setting), new MyTools.C_DGColumn_Bind(col.inn, MyTools.E_TypeColumnDG.Text, "inn", setting), new MyTools.C_DGColumn_Bind(col.date, MyTools.E_TypeColumnDG.Text, "date", setting), new MyTools.C_DGColumn_Bind(col.type_calc, MyTools.E_TypeColumnDG.Text, "type_calc", setting), new MyTools.C_DGColumn_Bind(col.score, MyTools.E_TypeColumnDG.Text, "score", setting), new MyTools.C_DGColumn_Bind(col.invoces, MyTools.E_TypeColumnDG.Text, "invoces", setting), new MyTools.C_DGColumn_Bind(col.act, MyTools.E_TypeColumnDG.Text, "act", setting), new MyTools.C_DGColumn_Bind(col.summ, MyTools.E_TypeColumnDG.Text, "summ", setting), new MyTools.C_DGColumn_Bind(col.adres, MyTools.E_TypeColumnDG.Text, "adres", setting), }; ColumnsFromDG = list.ToArray(); }
/// <summary>Создать колонки</summary> public void CreateColumn() { MyTools.C_Setting_DGColumn settingOneWay = new MyTools.C_Setting_DGColumn(); List <column> Result = new List <column>(); Result.Add(new column(ThisColumn.Number, "Number", ThisColumn.Numbern, settingOneWay)); Result.Add(new column(ThisColumn.Company, "Company", ThisColumn.Companyn, settingOneWay)); Result.Add(new column(ThisColumn.Well, "Well", ThisColumn.Welln, settingOneWay)); Result.Add(new column(ThisColumn.Folder, "Folder", ThisColumn.Foldern, settingOneWay)); Result.Add(new column(ThisColumn.Status, "Status", ThisColumn.Statusn, settingOneWay)); Result.Add(new column(ThisColumn.DateTime, "DateTime", ThisColumn.DateTimen, settingOneWay)); Result.Add(new column(ThisColumn.Volume, "Volume", ThisColumn.Volumen, new MyTools.C_Setting_DGColumn(BindingMode.TwoWay, UpdateSourceTrigger.PropertyChanged, CanEdit))); Result.Add(new column(ThisColumn.Summ, "Summ", ThisColumn.Summn, settingOneWay)); int now = Result.Count; { var pollutions = PollutionBase_Class.AllPolutions; Result.AddRange(pollutions.Select(x => new column(x.CurtName.SymbolConverter(), $"Values[{x.BindName}].Value", x.Number + now, new MyTools.C_Setting_DGColumn(BindingMode.TwoWay, IsReadOnly: CanEdit)))); } columns = Result.ToArray(); }
public column(string Header, string path, int Number, MyTools.C_Setting_DGColumn setting) : base(Header, MyTools.E_TypeColumnDG.Text, path, setting) { this.Number = Number; this.BIND = path; }