コード例 #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"));
 }
コード例 #2
0
 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.");
 }
コード例 #3
0
 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);
 }
コード例 #4
0
 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);
 }
コード例 #5
0
 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();
 }