コード例 #1
0
 public ProductEntity ByProductNameGetInfo(ProductEntity entity)
 {
     CustomDataCommand command = DataCommandManager.CreateCustomDataCommandFromConfig("ByProductNameGetInfo");
     command.SetParameterValue("@ProductName", entity.ProductName);
     command.SetParameterValue("@SysNo", entity.SysNo);
     ProductEntity result = command.ExecuteEntity<ProductEntity>();
     return result;
 }
コード例 #2
0
 public int ByProductNameGetInfo(string productName, string sysno)
 {
     int SysNo;
     int.TryParse(sysno, out SysNo);
     ProductEntity entity = new ProductEntity() { ProductName = productName, SysNo = SysNo };
     ProductEntity cheEntity = ProductFacade.ByProductNameGetInfo(entity);
     if (cheEntity == null || cheEntity.SysNo == 0)
     {
         return 1;
     }
     return 0;
 }
コード例 #3
0
 public int Create(ProductEntity obj)
 {
     obj.InDate = DateTime.Now;
     obj.InUser = WebContext.LoginUser.UserName;
     obj.Status = 0;
     if (obj.SysNo == 0)
     {
         return ProductFacade.InsertProduct(obj);
     }
     else
     {
         return ProductFacade.UpdateProduct(obj);
     }
 }
コード例 #4
0
 public int InsertProduct(ProductEntity entity)
 {
     CustomDataCommand command = DataCommandManager.CreateCustomDataCommandFromConfig("InsertProduct");
     command.SetParameterValue("@ProductTypeSysNo", entity.ProductTypeSysNo);
     command.SetParameterValue("@ProductName", entity.ProductName);
     command.SetParameterValue("@Price", entity.Price);
     command.SetParameterValue("@Weight", entity.Weight);
     command.SetParameterValue("@Mdient", entity.Mdient);
     command.SetParameterValue("@Sdient", entity.Sdient);
     command.SetParameterValue("@Method", entity.Method);
     command.SetParameterValue("@Order", entity.Order);
     command.SetParameterValue("@SmallImageUrl", entity.SmallImageUrl);
     command.SetParameterValue("@BigImageUrl", entity.BigImageUrl);
     command.SetParameterValue("@Status", entity.Status);
     command.SetParameterValue("@InUser", entity.InUser);
     command.SetParameterValue("@InDate", entity.InDate);
     object obj = command.ExecuteScalar();
     if (obj != null)
         return Convert.ToInt32(obj);
     else
         return 0;
 }
コード例 #5
0
 /// <summary>
 /// 
 /// </summary>
 /// <param name="log"></param>
 public static int UpdateProduct(ProductEntity entity)
 {
     return RestClient.Post<int>("ProductService/UpdateProduct", entity);
 }
コード例 #6
0
 /// <summary>
 /// 
 /// </summary>
 /// <param name="log"></param>
 public static int InsertProduct(ProductEntity entity)
 {
     return RestClient.Post<int>("ProductService/InsertProduct", entity);
 }
コード例 #7
0
 /// <summary>
 /// 
 /// </summary>
 /// <param name="log"></param>
 public static ProductEntity ByProductNameGetInfo(ProductEntity entity)
 {
     return RestClient.Post<ProductEntity>("ProductService/ByProductNameGetInfo", entity);
 }
コード例 #8
0
 public int UpdateProduct(ProductEntity entity)
 {
     return ObjectFactory<IProductDataAccess>.Instance.UpdateProduct(entity);
 }
コード例 #9
0
 public ProductEntity ByProductNameGetInfo(ProductEntity entity)
 {
     return ObjectFactory<IProductDataAccess>.Instance.ByProductNameGetInfo(entity);
 }
コード例 #10
0
 public int UpdateProduct(ProductEntity entity)
 {
     CustomDataCommand command = DataCommandManager.CreateCustomDataCommandFromConfig("UpdateProduct");
     command.SetParameterValue("@SysNo", entity.SysNo);
     command.SetParameterValue("@ProductTypeSysNo", entity.ProductTypeSysNo);
     command.SetParameterValue("@ProductName", entity.ProductName);
     command.SetParameterValue("@Price", entity.Price);
     command.SetParameterValue("@Weight", entity.Weight);
     command.SetParameterValue("@Mdient", entity.Mdient);
     command.SetParameterValue("@Sdient", entity.Sdient);
     command.SetParameterValue("@Method", entity.Method);
     command.SetParameterValue("@Order", entity.Order);
     command.SetParameterValue("@SmallImageUrl", entity.SmallImageUrl);
     command.SetParameterValue("@BigImageUrl", entity.BigImageUrl);
     command.SetParameterValue("@Status", entity.Status);
     command.SetParameterValue("@InUser", entity.InUser);
     command.SetParameterValue("@InDate", entity.InDate);
     return command.ExecuteNonQuery();
 }