- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 21
- 22
- 23
- 24
- 25
- 26
- 27
- 28
- 29
- 30
- 31
- 32
- 33
- 34
- 35
- 36
- 37
- 38
protected override void mergeModels(IStuff Stuff, IStuff With)
{
var stuff = (MyObject)Stuff;
var with = (MyObject)With;
if (with.title != null)
stuff.title = with.title;
if (with.description != null)
stuff.description = with.description;
if (with.creator != null)
stuff.creator = with.creator;
if (with.status != null)
stuff.status = with.status;
if (with.client_name != null)
stuff.client_name = with.client_name;
if (with.client_mail != null)
stuff.client_mail = with.client_mail;
if (with.client_phone != null)
stuff.client_phone = with.client_phone;
if (with.folder != null)
stuff.folder = with.folder;
if (with.flag1 != null)
stuff.flag1 = with.flag1;
if (with.flag2 != null)
stuff.flag2 = with.flag2;
if (with.flag3 != null)
stuff.flag4 = with.flag3;
if (with.flag4 != null)
stuff.flag4 = with.flag4;
if (with.flag5 != null)
stuff.flag5 = with.flag5;
if (with.flag6 != null)
stuff.flag6 = with.flag6;
if (with.flag7 != null)
stuff.flag7 = with.flag7;
}
gost 20.01.2016 10:59 # 0
roman-kashitsyn 20.01.2016 11:10 # +1
Мержим все ненулевые поля из with в stuff.
gost 20.01.2016 19:49 # 0
akaDElpher 04.02.2016 08:43 # +1
roman-kashitsyn 20.01.2016 11:09 # +6
yakov_255 20.01.2016 13:36 # +6
Спасибо!!!
3_14dar 22.01.2016 05:06 # +3
guest 01.03.2016 17:40 # 0
guest 01.03.2016 20:25 # 0
(Если этот код не управляет самолетом, дверным замком...)
2_71828182846 24.08.2021 20:38 # 0