• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C# DAL.SycousCon类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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


示例16: CreateProperty

        public static Boolean CreateProperty(Property prop )
        {
            String propertyID = String.Empty;
               Boolean flag = false;
               if (!(IsExistingProperty(prop)))
               {
               using (TransactionScope scope = new TransactionScope())
               {
                   using (var context = new SycousCon())
                   {
                       try
                       {
                           context.Properties.AddObject(prop);
                           context.SaveChanges();
                           scope.Complete();
                           context.AcceptAllChanges();
                           propertyID = prop.ID.ToString();
                           flag = true;
                       }
                       catch (Exception ex)
                       {
                           context.Dispose();
                           throw;
                       }
                   }//
               }// using
               }//if

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


示例17: CreateEnergy

        public static Boolean CreateEnergy(Energy energy)
        {
            Boolean flag = false;
              if (!(IsExistingEnergy(energy)))
              {
              using (TransactionScope scope = new TransactionScope())
              {
                  using (var context = new SycousCon())
                  {
                      try
                      {
                          context.Energies.AddObject(energy);
                          context.SaveChanges();
                          scope.Complete();
                          context.AcceptAllChanges();
                          flag = true;
                      }
                      catch (Exception ex)
                      {
                          context.Dispose();
                          throw;
                      }
                  }//
              }// using
              }//if

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


示例18: CreateUnOccupiedProperty

        public static Boolean CreateUnOccupiedProperty(UnOccupiedProperty UnOccupied)
        {
            Boolean flag = false;
            if (!(IsExistingUnOccupiedProperty(UnOccupied)))
            {
                using (TransactionScope scope = new TransactionScope())
                {
                    using (var context = new SycousCon())
                    {
                        try
                        {
                            context.UnOccupiedProperties.AddObject(UnOccupied);
                            context.SaveChanges();
                            scope.Complete();
                            context.AcceptAllChanges();
                            flag = true;
                        }
                        catch (Exception ex)
                        {
                            context.Dispose();
                            throw;
                        }
                    }//
                }// using
            }//if

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


示例19: AddTariffProperty

        public static Boolean AddTariffProperty(List<DAL.TariffInProperty> tariff)
        {
            Boolean flag = false;
               using (TransactionScope scope = new TransactionScope())
               {
               using (var context = new SycousCon())
               {
                   try
                   {
                       foreach (DAL.TariffInProperty item in tariff)
                       {
                           context.TariffInProperties.AddObject(item);

                       }
                       context.SaveChanges();
                       context.AcceptAllChanges();
                       scope.Complete();
                       flag = true;
                   }
                   catch (Exception ex)
                   {
                       context.Dispose();
                       throw;
                   }
               }// using
               return flag;
               }// trans
        }
开发者ID:arnabknd4,项目名称:scs0400915,代码行数:28,代码来源:DALProperty.cs


示例20: CreateUnit

 public static Boolean CreateUnit(UnitMaster unit)
 {
     Boolean flag = false;
     if (!(IsExistingUnit(unit)))
     {
         using (TransactionScope scope = new TransactionScope())
         {
             using (var context = new SycousCon())
             {
                 try
                 {
                     context.UnitMasters.AddObject(unit);
                     context.SaveChanges();
                     scope.Complete();
                     context.AcceptAllChanges();
                     flag = true;
                 }
                 catch (Exception ex)
                 {
                     context.Dispose();
                     throw;
                 }
             }
         }
     }
     return flag;
 }
开发者ID:arnabknd4,项目名称:sycos_latest,代码行数:27,代码来源:DALUnit.cs



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# DAL.clsDataLayer类代码示例发布时间:2022-05-24
下一篇:
C# DAL.DALConexao类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap