Esempio n. 1
0
 public bool AddProductItem(string productID, string productName
                            , string produceDate, string productCategory
                            , string descript)
 {
     try
     {
         int result = int.Parse(DbOperate.ExecuteNonQuery(SqlInsertItem
                                                          , new object[5]
         {
             productID
             , productName
             , produceDate
             , productCategory
             , descript
         }).ToString());
         if (result > 0)
         {
             return(true);
         }
     }
     catch (System.Exception ex)
     {
         MessageBox.Show("添加数据时出现错误:" + ex.Message);
     }
     return(false);
 }
 public bool DeleteOrderInfo()
 {
     try
     {
         int result = int.Parse(DbOperate.ExecuteNonQuery(
                                    sqlDeleteRemoveOrderInfo
                                    , null).ToString());
         if (result > 0)
         {
             return(true);
         }
     }
     catch (System.Exception ex)
     {
         MessageBox.Show("删除数据时出现错误:" + ex.Message);
     }
     return(false);
 }
Esempio n. 3
0
 public bool DeleteProductItem(string productID)
 {
     try
     {
         int result = int.Parse(DbOperate.ExecuteNonQuery(sqlDelete
                                                          , new object[1]
         {
             productID
         }).ToString());
         if (result > 0)
         {
             return(true);
         }
     }
     catch (System.Exception ex)
     {
         MessageBox.Show("删除数据时出现错误:" + ex.Message);
     }
     return(false);
 }
Esempio n. 4
0
 public bool SetProductInStorage(string productID)
 {
     try
     {
         int result = int.Parse(DbOperate.ExecuteNonQuery(
                                    sqlUpdateChangeStorageStatusToInStorage
                                    , new object[1]
         {
             productID
         }).ToString());
         if (result > 0)
         {
             return(true);
         }
     }
     catch (System.Exception ex)
     {
         MessageBox.Show("入库时出现错误:" + ex.Message);
     }
     return(false);
 }
Esempio n. 5
0
 public bool CheckEpcExist(string epc)
 {
     try
     {
         int result = int.Parse(DbOperate.ExecuteNonQuery(
                                    sqlSelectGetEpc
                                    , new object[1]
         {
             epc
         }).ToString());
         if (result > 0)
         {
             return(true);
         }
     }
     catch (System.Exception ex)
     {
         MessageBox.Show("查询数据时出现错误:" + ex.Message);
     }
     return(false);
 }
 public bool ChangeProductStatusforOutInventory(string productID)
 {
     try
     {
         int result = int.Parse(DbOperate.ExecuteNonQuery(
                                    sqlUpdateOutInventory
                                    , new object[1]
         {
             productID
         }).ToString());
         if (result > 0)
         {
             return(true);
         }
     }
     catch (System.Exception ex)
     {
         MessageBox.Show("删除数据时出现错误:" + ex.Message);
     }
     return(false);
 }
Esempio n. 7
0
 public bool AddOrderItem(string productName, int productQuantity)
 {
     try
     {
         int result = int.Parse(DbOperate.ExecuteNonQuery(
                                    sqlInsertAddOrderItem
                                    , new object[2]
         {
             productName
             , productQuantity
         }).ToString());
         if (result > 0)
         {
             return(true);
         }
     }
     catch (System.Exception ex)
     {
         MessageBox.Show("添加订单项时出现错误:" + ex.Message);
     }
     return(false);
 }
 public bool InsertProductInfoIntoOutInventory(string productID, string datetime)
 {
     try
     {
         int result = int.Parse(DbOperate.ExecuteNonQuery(
                                    sqlInsertOutInventory
                                    , new object[2]
         {
             datetime
             , productID
         }).ToString());
         if (result > 0)
         {
             return(true);
         }
     }
     catch (System.Exception ex)
     {
         MessageBox.Show("插入数据时出现错误:" + ex.Message);
     }
     return(false);
 }