コード例 #1
0
 internal void InventoryTypeUpdate(InventoryTypeVO inventoryTypeVO)
 {
     SqlParameter[] updateInventoryTypeParameter = new SqlParameter[5];
     updateInventoryTypeParameter[0] = new SqlParameter("InventoryTypeCode", inventoryTypeVO.InventoryTypeCode);
     updateInventoryTypeParameter[1] = new SqlParameter("ReceivingQuantity", inventoryTypeVO.ReceivingQuantity);
     updateInventoryTypeParameter[2] = new SqlParameter("InventoryName", inventoryTypeVO.InventoryName);
     updateInventoryTypeParameter[3] = new SqlParameter("MaterialClassification", inventoryTypeVO.MaterialClassification);
     updateInventoryTypeParameter[4] = new SqlParameter("MinimumQuantity", inventoryTypeVO.MinimumQuantity);
     new DBConnection().Update("UpdateInventoryType", updateInventoryTypeParameter);
 }
コード例 #2
0
 /// <summary>
 /// 재고종류 추가하기
 /// </summary>
 /// <param name="inventoryTypeVO"></param>
 internal void InventoryTypeInsert(InventoryTypeVO inventoryTypeVO)
 {
     SqlParameter[] InventoryTypeInsertParameters = new SqlParameter[4];
     InventoryTypeInsertParameters[0] = new SqlParameter("InventoryTypeCode", inventoryTypeVO.InventoryTypeCode);
     InventoryTypeInsertParameters[1] = new SqlParameter("ReceivingQuantity", inventoryTypeVO.ReceivingQuantity);
     InventoryTypeInsertParameters[2] = new SqlParameter("InventoryName", inventoryTypeVO.InventoryName);
     InventoryTypeInsertParameters[3] = new SqlParameter("MaterialClassification", inventoryTypeVO.MaterialClassification);
     try
     {
         new DBConnection().Insert("InsertInventoryType", InventoryTypeInsertParameters);
     }
     catch (SqlException)
     {
         throw;
     }
 }
コード例 #3
0
        /// <summary>
        /// 재고종류 업데이트
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void btnUpdate_Click(object sender, EventArgs e)
        {
            if (MaterialClassification.Contains(dgvInventoryType.SelectedRows[0].Cells["재료구분"].Value.ToString()))
            {
                InventoryTypeVO inventoryTypeVO = new InventoryTypeVO()
                {
                    InventoryTypeCode      = dgvInventoryType.SelectedRows[0].Cells["재고종류코드"].Value.ToString(),
                    ReceivingQuantity      = Int32.Parse(dgvInventoryType.SelectedRows[0].Cells["입고정량"].Value.ToString()),
                    MinimumQuantity        = Int32.Parse(dgvInventoryType.SelectedRows[0].Cells["최소재고"].Value.ToString()),
                    InventoryName          = dgvInventoryType.SelectedRows[0].Cells["재고명"].Value.ToString(),
                    MaterialClassification = dgvInventoryType.SelectedRows[0].Cells["재료구분"].Value.ToString(),
                };

                new InventoryTypeDAO().InventoryTypeUpdate(inventoryTypeVO);
                InventoryTypeSelect();
            }
            else
            {
                MessageBox.Show("기존 재료구분 내에서 입력해주세요.\n Bread, Cheese, Additional, Sauce, Topping, Vegetable, Side");
            }
        }