本文整理汇总了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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}