Пример #1
0
 /// <summary>
 /// 添加用户基础信息
 /// </summary>
 /// <param name="entity">用户信息</param>
 /// <returns></returns>
 public static int InsertCustomerBase(CustomerInfo entity)
 {
     DataCommand cmd = DataCommandManager.GetDataCommand("InsertCustomerBase");
     cmd.SetParameterValue<CustomerInfo>(entity);
     cmd.ExecuteNonQuery();
     return Convert.ToInt32(cmd.GetParameterValue("@SysNo"));
 }
 public void InsertCustomerTest()
 {
     CustomerMgtService target = new CustomerMgtService(); // TODO: Initialize to an appropriate value
     CustomerInfo entity = new CustomerInfo()
     {
         CustomerID = "*****@*****.**",
         Password = "******",
         Status = CustomerStatus.Valid,
         RegIP = "192.168.1.104"
     };
     var customerSysNo = CustomerMgtService.Instance.InsertCustomer(entity);
     int expected = 0; // TODO: Initialize to an appropriate value
     int actual;
     actual = target.InsertCustomer(entity);
     Assert.AreEqual(expected, actual);
     Assert.Inconclusive("Verify the correctness of this test method.");
 }
 public void UpdateCustomerStatusBySysNoTest()
 {
     CustomerMgtService target = new CustomerMgtService(); // TODO: Initialize to an appropriate value
     CustomerInfo entity = new CustomerInfo()
     {
         SysNo = 100002,
         Status = CustomerStatus.Deleted
     };
     target.UpdateCustomerStatusBySysNo(entity);
 }
 public void UpdateCustomerPasswordByUserIDTest()
 {
     CustomerMgtService target = new CustomerMgtService(); // TODO: Initialize to an appropriate value
     CustomerInfo entity = new CustomerInfo()
     {
         CustomerID = "*****@*****.**",
         Password = "******"
     };
     string oldPassword = "******";
     target.UpdateCustomerPasswordByUserID(entity, oldPassword);
 }
 public void UpdateCustomerBaseBySysNoTest()
 {
     CustomerMgtService target = new CustomerMgtService(); // TODO: Initialize to an appropriate value
     CustomerInfo entity = new CustomerInfo()
     {
         SysNo = 100002,
         CustomerID = "*****@*****.**",
         CustomerName = "Test",
         Status = CustomerStatus.InValid
     };
     target.UpdateCustomerBaseBySysNo(entity);
 }
Пример #6
0
 /// <summary>
 /// 更新用户状态
 /// </summary>
 /// <param name="entity">用户信息</param>
 public static void UpdateCustomerStatusBySysNo(CustomerInfo entity)
 {
     DataCommand cmd = DataCommandManager.GetDataCommand("UpdateCustomerStatusBySysNo");
     cmd.SetParameterValue<CustomerInfo>(entity);
     cmd.ExecuteNonQuery();
 }
Пример #7
0
 /// <summary>
 /// 更新用户密码
 /// </summary>
 /// <param name="entity">用户信息</param>
 public static void UpdateCustomerPasswordByCustomerID(CustomerInfo entity)
 {
     DataCommand cmd = DataCommandManager.GetDataCommand("UpdateCustomerPasswordByCustomerID");
     cmd.SetParameterValue<CustomerInfo>(entity);
     cmd.ExecuteNonQuery();
 }