Exemplo n.º 1
0
        public CampaignDetail Create(int campaignID,int contractDetailID)
        {
            CampaignDetail old = DB.CampaignDetails.Where(r => r.CampaignID == campaignID && r.ContractDetailID == contractDetailID).SingleOrDefault();

            if (old != null) return null;

            CampaignDetail e = new CampaignDetail();
            e.CampaignID = campaignID;
            e.ContractDetailID = contractDetailID;

            DB.CampaignDetails.AddObject(e);

            return e;
        }
Exemplo n.º 2
0
 /// <summary>
 /// Deprecated Method for adding a new object to the CampaignDetails EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
 /// </summary>
 public void AddToCampaignDetails(CampaignDetail campaignDetail)
 {
     base.AddObject("CampaignDetails", campaignDetail);
 }
Exemplo n.º 3
0
 /// <summary>
 /// Create a new CampaignDetail object.
 /// </summary>
 /// <param name="id">Initial value of the ID property.</param>
 public static CampaignDetail CreateCampaignDetail(global::System.Int32 id)
 {
     CampaignDetail campaignDetail = new CampaignDetail();
     campaignDetail.ID = id;
     return campaignDetail;
 }