📄 customer.cs
字号:
using System;
using System.Collections;
using System.Data;
using System.Data.SqlClient;
using CRM.IDAL;
using CRM.Model;
namespace CRM.BLL
{
/// <summary>
/// Customer 的摘要说明。
/// </summary>
public class Customer : Common
{
#region ICustomer 成员
public static DataTable GetAllCustomer()
{
ICustomer dal=CRM.DALFactory.Customer.Create();
return dal.GetAllCustomer();
}
public static void Insert(SysUserInfo user,CustomerInfo customer)
{
if(!Common.CheckStrIsNull(user.UserId,customer.CustomerName,customer.Leader,customer.TypeId,customer.DeputyId,customer.LevelId))
{
ICustomer dal=CRM.DALFactory.Customer.Create();
dal.Insert(user,customer);
}
}
public static CustomerInfo GetCustomerById(string customerId)
{
if(Common.CheckStrIsNull(customerId))
return null;
ICustomer dal=CRM.DALFactory.Customer.Create();
return dal.GetCustomerById(customerId);
}
public static void Delete(string customerId)
{
if(!Common.CheckStrIsNull(customerId))
{
ICustomer dal=CRM.DALFactory.Customer.Create();
dal.Delete(customerId);
}
}
public static void Update(CustomerInfo customer)
{
if(!Common.CheckStrIsNull(customer.CustomerId,customer.CustomerName,customer.Leader,customer.TypeId,customer.DeputyId,customer.LevelId))
{
ICustomer dal=CRM.DALFactory.Customer.Create();
dal.Update(customer);
}
}
public static DataTable GetCustomerByTypeId(string typeId)
{
if(Common.CheckStrIsNull(typeId))
return null;
ICustomer dal=CRM.DALFactory.Customer.Create();
return dal.GetCustomerByTypeId(typeId);
}
public static SysUserInfo GetSysUserByCustomerId(string customerId)
{
if(Common.CheckStrIsNull(customerId))
return null;
ICustomer dal=CRM.DALFactory.Customer.Create();
return dal.GetSysUserByCustomerId(customerId);
}
#endregion
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -