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;
        }
Exemple #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);
 }
Exemple #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;
 }