当前位置: 首页>>代码示例>>C#>>正文


C# SidejobEntities.AddToRefundProfessionalSuccessfulPDTs方法代码示例

本文整理汇总了C#中SidejobModel.SidejobEntities.AddToRefundProfessionalSuccessfulPDTs方法的典型用法代码示例。如果您正苦于以下问题:C# SidejobEntities.AddToRefundProfessionalSuccessfulPDTs方法的具体用法?C# SidejobEntities.AddToRefundProfessionalSuccessfulPDTs怎么用?C# SidejobEntities.AddToRefundProfessionalSuccessfulPDTs使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在SidejobModel.SidejobEntities的用法示例。


在下文中一共展示了SidejobEntities.AddToRefundProfessionalSuccessfulPDTs方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: CheckRefundedProfessionalPDT

 public void CheckRefundedProfessionalPDT(SidejobEntities context, ProfessionalSuccessfulPDT e)
 {
     //Check if Record exist
     if ((from c in context.RefundProfessionalSuccessfulPDTs
          where PDTID == e.PDTID
          select c).FirstOrDefault() == null)
     {
         //Insert the new refund from the successful table
         var refund = new RefundProfessionalSuccessfulPDT
                          {
                              PDTID = e.PDTID,
                              GrossTotal = e.GrossTotal,
                              Invoice = e.Invoice,
                              PaymentStatus = e.PaymentStatus,
                              FirstName = e.FirstName,
                              LastName = e.LastName,
                              PaymentFee = e.PaymentFee,
                              BusinessEmail = e.BusinessEmail,
                              TxToken = e.TxToken,
                              ReceiverEmail = e.ReceiverEmail,
                              ItemName = e.ItemName,
                              CurrencyCode = e.CurrencyCode,
                              TransactionId = e.TransactionId,
                              Custom = e.Custom,
                              subscriberId = e.subscriberId,
                              ProID = e.ProID,
                              ProjectID = e.ProjectID
                          };
         context.AddToRefundProfessionalSuccessfulPDTs(refund);
         context.SaveChanges();
         PDTID = e.PDTID;
     }
 }
开发者ID:haithemaraissia,项目名称:SJSchedule,代码行数:33,代码来源:ResponseDelay.aspx.cs

示例2: CheckProfessionalArchivedPDT

    public void CheckProfessionalArchivedPDT(int professionalId, SidejobEntities context)
    {
        //Check ArchivedSuccessful PDT
        var e1 = (from c in context.ArchivedProfessionalSuccessfulPDTs
                  where c.ProID == professionalId && c.ProjectID == ProjectID
                  select c).FirstOrDefault();
        if (e1 != null)
        {
            var transaction = e1.TransactionId;
            //Insert the new refund from archieved table

            //Check if Transaction exist in Refund
            var exist = (from c in context.RefundProfessionalSuccessfulPDTs
                         where c.TransactionId == transaction
                         select c).FirstOrDefault();
            if (exist == null)
            {
                //Check if Transaction exist in ArchivedRefund
                var existarchived = (from c in context.ArchivedRefundProfessionalSuccessfulPDTs
                                     where c.TransactionId == transaction
                                     select c).FirstOrDefault();

                if (existarchived == null)
                {
                    //Check if Record exist
                    if ((from c in context.RefundProfessionalSuccessfulPDTs
                         where PDTID == e1.PDTID
                         select c).FirstOrDefault() == null)
                    {
                        //Insert the new record
                        var archivedrefund = new RefundProfessionalSuccessfulPDT
                                                 {
                                                     PDTID = e1.PDTID,
                                                     GrossTotal = e1.GrossTotal,
                                                     Invoice = e1.Invoice,
                                                     PaymentStatus = e1.PaymentStatus,
                                                     FirstName = e1.FirstName,
                                                     LastName = e1.LastName,
                                                     PaymentFee = e1.PaymentFee,
                                                     BusinessEmail = e1.BusinessEmail,
                                                     TxToken = e1.TxToken,
                                                     ReceiverEmail = e1.ReceiverEmail,
                                                     ItemName = e1.ItemName,
                                                     CurrencyCode = e1.CurrencyCode,
                                                     TransactionId = e1.TransactionId,
                                                     Custom = e1.Custom,
                                                     subscriberId = e1.subscriberId,
                                                     ProID = e1.ProID,
                                                     ProjectID = e1.ProjectID
                                                 };
                        context.AddToRefundProfessionalSuccessfulPDTs(archivedrefund);
                        context.SaveChanges();
                        PDTID = e1.PDTID;
                    }
                }
            }
        }
    }
开发者ID:haithemaraissia,项目名称:SJSchedule,代码行数:58,代码来源:ResponseDelay.aspx.cs


注:本文中的SidejobModel.SidejobEntities.AddToRefundProfessionalSuccessfulPDTs方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。