private ProductOrigin GetProductOriginFrom(DataRow row) { if (row == null) return null; ProductOrigin po = new ProductOrigin(); po.OriginID = Formatter.GetStringValueFrom(row, "OriginID"); po.OriginName = Formatter.GetStringValueFrom(row, "OriginName"); po.Remark = Formatter.GetStringValueFrom(row, "Remark"); return po; }
private void AssignNewOrigin(ProductOrigin item) { if (item == null) return; if (!origins.ContainsKey(item.OriginID)) return; ProductOrigin oldItem = origins[item.OriginID]; oldItem.OriginName = item.OriginName; oldItem.Remark = item.Remark; }