Пример #1
0
 /// <summary>
 /// 插入
 /// </summary>
 /// <param name="pware"></param>
 /// <param name="SQLCommand"></param>
 /// <returns></returns>
 public bool insertPWarehouseTable_DetailedBll(PWarehouseTable_Detailed pware, string SQLCommand)
 {
     if (pwarDal.insertPWarehouseTable_DetailedDal(pware, SQLCommand) > 0)
     {
         return(true);
     }
     else
     {
         return(false);
     }
 }
        /// <summary>
        /// 插入
        /// </summary>
        /// <param name="pware"></param>
        /// <param name="SQLCommand"></param>
        /// <returns></returns>
        public int insertPWarehouseTable_DetailedDal(PWarehouseTable_Detailed pware, string SQLCommand)
        {
            string sql = SQLhelp.GetSQLCommand(SQLCommand);

            SqlParameter[] pms = new SqlParameter[]
            {
                new SqlParameter("@PurchaseReceiptID", SqlDbType.VarChar, 100)
                {
                    Value = pware.PurchaseReceiptID
                },
                new SqlParameter("@PurchaseNo", SqlDbType.VarChar, 80)
                {
                    Value = pware.PurchaseNo
                },
                new SqlParameter("@SupplierName", SqlDbType.VarChar, 80)
                {
                    Value = pware.SupplierName
                },
                new SqlParameter("@BatchNo", SqlDbType.VarChar, 80)
                {
                    Value = pware.BatchNo
                },
                new SqlParameter("@MaterialCode", SqlDbType.VarChar, 80)
                {
                    Value = pware.MaterialCode
                },
                new SqlParameter("@MaterialName", SqlDbType.VarChar, 80)
                {
                    Value = pware.MaterialName
                },
                new SqlParameter("@MaterialSpecifications", SqlDbType.VarChar, 80)
                {
                    Value = pware.MaterialSpecifications
                },
                new SqlParameter("@ProductQuantity", SqlDbType.Int)
                {
                    Value = pware.ProductQuantity
                },
                new SqlParameter("@note", SqlDbType.VarChar, 200)
                {
                    Value = pware.note
                },
                new SqlParameter("@StorageAddress", SqlDbType.VarChar, 255)
                {
                    Value = pware.StorageAddress
                },
                new SqlParameter("@UserName", SqlDbType.VarChar, 50)
                {
                    Value = pware.UserName
                }
            };

            return(SQLhelp.ExecuteNonQuery(sql, CommandType.Text, pms));
        }
Пример #3
0
        PWarehouseTable_Detailed GetPWarehouseTable_Detailed()
        {
            PWarehouseTable_Detailed pwar = new PWarehouseTable_Detailed()
            {
                PurchaseReceiptID      = TxtBox_PurchaseReceiptID.Text.Trim(),
                PurchaseNo             = TxtBox_PurchaseNo.Text.Trim(),
                SupplierName           = TxtBox_SupplierName.Text.Trim(),
                BatchNo                = TxtBox_BatchNo.Text.Trim(),
                MaterialCode           = TxtBox_MaterialCode.Text.Trim(),
                MaterialName           = TxtBox_MaterialName.Text.Trim(),
                MaterialSpecifications = TxtBox_MaterialSpecifications.Text.Trim(),
                ProductQuantity        = state == "特采"?ip_ChooseNumber.Value:ip_ProductQuantity.Value,
                note           = NOTE,
                StorageAddress = txt_StorageAddress.Text.Trim(),
                UserName       = UsersHelp.Userslist[0].UserName
            };

            return(pwar);
        }