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


C# DAL.SycousCon类代码示例

本文整理汇总了C#中DAL.SycousCon的典型用法代码示例。如果您正苦于以下问题:C# SycousCon类的具体用法?C# SycousCon怎么用?C# SycousCon使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


SycousCon类属于DAL命名空间,在下文中一共展示了SycousCon类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: CreateDirectDebitTLetteremplate

 public static Boolean CreateDirectDebitTLetteremplate(DirectDebitLetterTemplate directDebit)
 {
     Boolean flag = false;
     if (!(IsExistingDirectDebitTemplate(directDebit)))
     {
         using (TransactionScope scope = new TransactionScope())
         {
             using (var context = new SycousCon())
             {
                 try
                 {
                     context.DirectDebitLetterTemplates.AddObject(directDebit);
                     context.SaveChanges();
                     scope.Complete();
                     context.AcceptAllChanges();
                     flag = true;
                 }
                 catch (Exception ex)
                 {
                     context.Dispose();
                     throw;
                 }
             }
         }
     }
     return flag;
 }
开发者ID:arnabknd4,项目名称:scs2300915,代码行数:27,代码来源:DALDirectDebitTemplate.cs

示例2: GetContactConsumerList

        public static IEnumerable<ConsumerSearchList> GetContactConsumerList()
        {
            IEnumerable<ConsumerSearchList> List = null;
            try
            {
                using (var context = new SycousCon())
                {
                    try
                    {
                        var parmode = new SqlParameter
                        {
                            ParameterName = "mode",
                            Value = 1,
                            Direction = ParameterDirection.Input
                        };
                        List = context.ExecuteStoreQuery<ConsumerSearchList>("exec [SYCOUS].[GetConsumerContactList] @mode", parmode).ToList();
                    }
                    catch (Exception ex)
                    {
                        context.Dispose();
                        throw;
                    }
                }//using
            }
            catch (Exception ex)
            {
                throw;
            }

            return List;
        }
开发者ID:arnabknd4,项目名称:scs0400915,代码行数:31,代码来源:DALReceived.cs

示例3: DirectDebitConsumerDropdownList

        public static IEnumerable<DirectDebitConsumerDropdown> DirectDebitConsumerDropdownList(String ConsumerType,String ClientID)
        {
            IEnumerable<DirectDebitConsumerDropdown> List = null;
            try
            {
                using (var context = new SycousCon())
                {
                    var pConsumerType = new SqlParameter
                    {
                        ParameterName = "ConsumerType",
                        Value = ConsumerType,
                        Direction = ParameterDirection.Input
                    };
                    var pClientID = new SqlParameter
                    {
                        ParameterName = "ClientID",
                        Value = ClientID,
                        Direction = ParameterDirection.Input
                    };

                    List = context.ExecuteStoreQuery<DirectDebitConsumerDropdown>("exec SYCOUS.GetDirectDebitConsumerList @ConsumerType,@ClientID", pConsumerType, pClientID).ToList();
                }
            }
            catch (Exception ex)
            {
                throw;
            }
            return List;
        }
开发者ID:arnabknd4,项目名称:scs0400915,代码行数:29,代码来源:DALDirectDebit.cs

示例4: CreatePeerConsumerAverages

        public static Boolean CreatePeerConsumerAverages(PeerNConsumerAverage Peer)
        {
            Boolean flag = false;
            if (!(IsExistingPeerNConsumerAverage(Peer)))
            {
                using (TransactionScope scope = new TransactionScope())
                {
                    using (var context = new SycousCon())
                    {
                        try
                        {
                            context.PeerNConsumerAverages.AddObject(Peer);
                            context.SaveChanges();
                            scope.Complete();
                            context.AcceptAllChanges();
                            flag = true;
                        }
                        catch (Exception ex)
                        {
                            context.Dispose();
                            throw;
                        }
                    }//
                }// using
            }//if

            return flag;
        }
开发者ID:arnabknd4,项目名称:scs0400915,代码行数:28,代码来源:DALPeer.cs

示例5: CreateDataLoggerMapping

        public static Boolean CreateDataLoggerMapping(SiteInLogger logger)
        {
            Boolean flag = false;

                using (TransactionScope scope = new TransactionScope())
                {
                    using (var context = new SycousCon())
                    {
                        try
                        {
                            context.SiteInLoggers.AddObject(logger);
                            context.SaveChanges();
                            scope.Complete();
                            context.AcceptAllChanges();
                            flag = true;
                        }
                        catch (Exception ex)
                        {
                            context.Dispose();
                            throw;
                        }
                    }//
                }// using

            return flag;
        }
开发者ID:arnabknd4,项目名称:scs0400915,代码行数:26,代码来源:DALDataLogger.cs

示例6: UpdateExistResetPassword

        public static bool UpdateExistResetPassword(ResetPwd Pwd)
        {
            Boolean flag = true;
            using (TransactionScope scope = new TransactionScope())
            {
                using (var context = new SycousCon())
                {
                    try
                    {
                        var ResetToUpdate = context.ResetPwds.Where(c => c.UserID == Pwd.UserID && c.Active == false);
                        foreach (ResetPwd p in ResetToUpdate)
                        {
                            p.Active = true;
                            p.ModifyBy = Pwd.CreateBy;
                            p.ModifyDate = DateTime.Now;
                        }

                        context.SaveChanges();
                        context.AcceptAllChanges();
                        scope.Complete();
                        context.Dispose();
                        flag = true;
                    }
                    catch (Exception ex)
                    {
                        flag = false;
                        context.Dispose();
                        throw;
                    }
                }
            }
            return flag;
        }
开发者ID:arnabknd4,项目名称:scs2300915,代码行数:33,代码来源:DALUserReg.cs

示例7: CreateTemperatureDifference

        public static Boolean CreateTemperatureDifference(TemperatureDifference Temperature)
        {
            Boolean flag = false;
            if (!(IsExistingTemperatureDifference(Temperature)))
            {
                using (TransactionScope scope = new TransactionScope())
                {
                    using (var context = new SycousCon())
                    {
                        try
                        {
                            context.TemperatureDifferences.AddObject(Temperature);
                            context.SaveChanges();
                            scope.Complete();
                            context.AcceptAllChanges();
                            flag = true;
                        }
                        catch (Exception ex)
                        {
                            context.Dispose();
                            throw;
                        }
                    }//
                }// using
            }//if

            return flag;
        }
开发者ID:arnabknd4,项目名称:scs0400915,代码行数:28,代码来源:DALTemperature.cs

示例8: DetailsByDirectDebitWorkFlowRecordList

        public static IEnumerable<DirectDebitWrokFlowDetails> DetailsByDirectDebitWorkFlowRecordList(String DirectDebitID, String DueDate)
        {
            IEnumerable<DirectDebitWrokFlowDetails> List = null;
             using (var context = new SycousCon())
             {
                 try
                 {
                     var parDirectDebit = new SqlParameter
                     {
                         ParameterName = "DirectDebitID",
                         Value =  Convert.ToInt32(DirectDebitID),
                         Direction = ParameterDirection.Input
                     };
                     var parDueDate = new SqlParameter
                     {
                         ParameterName = "DueDate",
                         Value = Commmon.DateGB(DueDate.ToString()),
                         Direction = ParameterDirection.Input
                     };

                     List = context.ExecuteStoreQuery<DirectDebitWrokFlowDetails>("exec SYCOUS.GetDetailsByDirectDebit @DirectDebitID,@DueDate", parDirectDebit, parDueDate).ToList();
                 }
                 catch (Exception ex)
                 {
                     context.Dispose();
                     throw;
                 }
             }//using
             return List;
        }
开发者ID:arnabknd4,项目名称:scs0400915,代码行数:30,代码来源:DALWFDirectDebit.cs

示例9: CreateDepartment

 public static Boolean CreateDepartment(Department deptartment)
 {
     Boolean flag = false;
     using (TransactionScope scope = new TransactionScope())
     {
         if (!(IsExistingDeptarmentCode(deptartment.DeptCode)))
         {
             using (var context = new SycousCon())
             {
                 try
                 {
                     context.Departments.AddObject(deptartment);
                     context.SaveChanges();
                     scope.Complete();
                     context.AcceptAllChanges();
                     flag = true;
                 }
                 catch (Exception ex)
                 {
                     context.Dispose();
                     throw;
                 }
             }
         }
     }
     return flag;
 }
开发者ID:arnabknd4,项目名称:scs0400915,代码行数:27,代码来源:DALDept.cs

示例10: OwnerClientName

 public static String OwnerClientName(Int64 OwnerID)
 {
     String ClientName = String.Empty;
        using (var context = new SycousCon())
        {
        try
        {
            var _ClientName = (from O in context.Owners
                                    join P in  context.Properties
                                      on O.PropertyID equals P.ID
                                      join S in  context.SiteMasters
                                     on O.SiteID equals S.Id
                                      join C in context.ClientMasters
                                      on S.ClientID equals C.ClientID
                                      where (O.IsDeleted==0 && P.IsDeleted==0 && S.IsDeleted==0 && C.DeleteStatus==0&& O.ID==OwnerID)
                                      select C.Name
                                 ).FirstOrDefault();
            if (_ClientName != null)
            {
                ClientName = (String)_ClientName;
            }
        }
        catch (Exception ex)
        {
            context.Dispose();
            throw;
        }
        }
        return ClientName;
 }
开发者ID:arnabknd4,项目名称:scs2300915,代码行数:30,代码来源:DALOwner.cs

示例11: DeletedDirectDebit

        public static Boolean DeletedDirectDebit(DirectDebit debit)
        {
            using (TransactionScope scope = new TransactionScope())
            {
                Boolean bol = false;
                using (var context = new SycousCon())
                {
                    try
                    {
                        var Update = context.DirectDebits.Where(c => c.ID == debit.ID&& c.IsDeleted==0&&c.IsApproved==0);

                        foreach (DirectDebit p in Update)
                        {
                            p.IsDeleted = 2;
                            p.ModifyBy = debit.ModifyBy;
                            p.ModifyDate = DateTime.Now;

                        }//
                        context.SaveChanges();
                        context.AcceptAllChanges();
                        scope.Complete();
                        context.Dispose();
                        bol = true;
                    }
                    catch (Exception ex)
                    {
                        context.Dispose();
                        throw;
                    }

                }// using
                return bol;
            } //trans
        }
开发者ID:arnabknd4,项目名称:scs0400915,代码行数:34,代码来源:DALDirectDebit.cs

示例12: CreateSiteCreditControl

        public static Boolean CreateSiteCreditControl(SiteCreditControl site)
        {
            Boolean flag = false;
            if (!(IsExistingSiteCreditControl(site)))
            {
                using (TransactionScope scope = new TransactionScope())
                {
                    using (var context = new SycousCon())
                    {
                        try
                        {
                            context.SiteCreditControls.AddObject(site);
                            context.SaveChanges();
                            scope.Complete();
                            context.AcceptAllChanges();
                            flag = true;
                        }
                        catch (Exception ex)
                        {
                            context.Dispose();
                            throw;
                        }
                    }//
                }// using
            }//if

            return flag;
        }
开发者ID:arnabknd4,项目名称:scs0400915,代码行数:28,代码来源:DALCreditControl.cs

示例13: CreatePropertyBandInTariff

 public static Boolean CreatePropertyBandInTariff(PropertyBandInTariff tariff)
 {
     Boolean flag = false;
        if ((IsExistingPropertyBandInTariff(tariff)))
        {
        using (TransactionScope scope = new TransactionScope())
        {
            using (var context = new SycousCon())
            {
                try
                {
                    context.PropertyBandInTariffs.AddObject(tariff);
                    context.SaveChanges();
                    scope.Complete();
                    context.AcceptAllChanges();
                    flag = true;
                }
                catch (Exception ex)
                {
                    context.Dispose();
                    throw;
                }
            }
        }
        }
        return flag;
 }
开发者ID:arnabknd4,项目名称:scs0400915,代码行数:27,代码来源:DALTariff.cs

示例14: CreateDirectDebit

        public static Boolean CreateDirectDebit(DirectDebit mdirectdebit)
        {
            Boolean flag = false;

                using (TransactionScope scope = new TransactionScope())
                {
                    using (var context = new SycousCon())
                    {
                        try
                        {
                            context.DirectDebits.AddObject(mdirectdebit);
                            context.SaveChanges();
                            scope.Complete();
                            context.AcceptAllChanges();
                            flag = true;
                        }
                        catch (Exception ex)
                        {
                            context.Dispose();
                            throw;
                        }
                    }
                }

            return flag;
        }
开发者ID:arnabknd4,项目名称:scs0400915,代码行数:26,代码来源:DALDirectDebit.cs

示例15: AddProperty

        public static String AddProperty(Property prop)
        {
            String ReturnpropertyID = String.Empty;

               //if (!(IsExistingProperty(prop)))
               //{
               using (TransactionScope scope = new TransactionScope())
               {
                   using (var context = new SycousCon())
                   {
                       try
                       {
                           context.Properties.AddObject(prop);
                           context.SaveChanges();
                           scope.Complete();
                           context.AcceptAllChanges();
                           ReturnpropertyID = prop.ID.ToString();
                       }
                       catch (Exception ex)
                       {
                           context.Dispose();
                           throw;
                       }
                   }//
               }// using
               //}//if

               return ReturnpropertyID;
        }
开发者ID:arnabknd4,项目名称:scs0400915,代码行数:29,代码来源:DALProperty.cs


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